Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide events for all lifecycle methods on Component #300

Closed
p2kmgcl opened this issue Nov 17, 2017 · 1 comment
Closed

Provide events for all lifecycle methods on Component #300

p2kmgcl opened this issue Nov 17, 2017 · 1 comment

Comments

@p2kmgcl
Copy link
Contributor

p2kmgcl commented Nov 17, 2017

Currently there are only some events dispatched during lifecycle methods (willAttach, attached, willDetach, detached and rendered). I think it would be useful (and more consistent) to provide events for all existing lifecycle methods, so components' users can listen for these changes.

I have made a PR (#299) for the disposed lifecycle method, but it would be interesting adding events for the rest of them (created, willReceiveState...).


Example use case for the disposed event: I am storing a component inside a variable, and setting that variable to null when the component is disposed.

@robframpton
Copy link

Fixed by #299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants