1. 11
    Connect Redux to a React Application with react-redux
    4m 8s

Connect Redux to a React Application with react-redux

InstructorAndy Van Slaars

Share this video with your friends

Send Tweet

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.

Richard Poole
~ 7 years ago

Where did bindActionCreators come from? Might pay to check the order of these videos more carefully as they seem very jumbled.

Andrew Fritz
~ 7 years ago

+1, these all feel out of order.

James
~ 7 years ago

seems the order has been corrected, no?

Thang
~ 6 years ago

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?

Duy Nguyen
~ 5 years ago

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.