The next step is to connect to React using react-redux
. Use the document here to help you.
-
Install
react-redux
:npm install --save react-redux
-
Create container components using
connect()
together withmapStateToProps()
andmapDispatchToProps()
. -
Pass the store down by wrapping the top-level
App
component in aProvider
.
Oh! I forgot to say: for point (3) you'll need to wrap your
App
component in aProvider
, passing in the store, like this:
render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root')
)
See here for details.