DEV Community

Discussion on: React Beginner Question Thread ⚛

 
dan_abramov profile image
Dan Abramov

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().

Here’s a simple version: gist.github.com/gaearon/1d19088790...

Thread Thread
 
viniciuscamargo profile image
Vinicius Camargo

Thank you so much! That's exactly what I wanted to know :D

Thread Thread
 
cyan33 profile image
Chang Yan

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