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

Implement lifecycle hooks #14

Open
1 of 3 tasks
gaguirre opened this issue Jun 27, 2017 · 0 comments
Open
1 of 3 tasks

Implement lifecycle hooks #14

gaguirre opened this issue Jun 27, 2017 · 0 comments

Comments

@gaguirre
Copy link
Contributor

gaguirre commented Jun 27, 2017

Implement lifecycle hooks for:

  • component mount (will/did)
  • state update (will/did)
  • action dispatch (will/did)

All should be local, meaning that will only be triggered with changes in each component. Then we can discuss if some global hooks are needed.

Also we should discuss what you can (and can not) do into each different hook. So far I can think in these rules:

  • You can call a reducer in componentDidMount / stateDidUpdate
  • You can NOT call a reducer in componentWillMount / stateWillUpdate / actionWillDispatch / actionDidDispatch

In the case of actionWillDispatch and stateWillUpdate, see if should be possible to prevent them.

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

No branches or pull requests

1 participant