In this lesson, we’ll see how we can eliminate some of our plumbing code and take advantage of the react-redux library to connect our Redux store to our React application and let it handle subscribing to state changes in the store.
Where did bindActionCreators come from? Might pay to check the order of these videos more carefully as they seem very jumbled.
+1, these all feel out of order.
seems the order has been corrected, no?
I am a bit confused. Please help to clarify.
For lesson 11, after you connect the App and do
const ConnectedApp = connect(mapStateToProps, mapDispatchToProps)(App)
export default ConnectedApp
How does it still work when on index.js. You run:
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root'));
How does ConnectedApp get called?
Hey Thang, that was 3 months ago so I assumes you have the answer now.
Basically, ConnectedApp
is export as default
. So in index.js
you can import it with any name you want. You can name it App
or ConnectedApp
or whateverComponent
, depending on what name you want. In this case, and I guess it's just convention in general, we import
these connectedComponent with their original name.