Internally React Redux works by calling store.subscribe() when the component mounts. Every time the Redux store changes, the subscription callback fires. Inside it, React Redux calls React setState() by taking Redux store state and passing it through mapStateToProps().
Thanks Dan, the code example is really helpful. Also I found your video talk about react-redux very inspiring and straight-forward as well. For those who are interested, you can go to youtube.com/watch?v=VJ38wSFbM3A. <3
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Internally React Redux works by calling
store.subscribe()
when the component mounts. Every time the Redux store changes, the subscription callback fires. Inside it, React Redux calls ReactsetState()
by taking Redux store state and passing it throughmapStateToProps()
.Here’s a simple version: gist.github.com/gaearon/1d19088790...
Thank you so much! That's exactly what I wanted to know :D
Thanks Dan, the code example is really helpful. Also I found your video talk about react-redux very inspiring and straight-forward as well. For those who are interested, you can go to
youtube.com/watch?v=VJ38wSFbM3A. <3