Learn
Congratulations on finishing this lesson on the react-redux
library! Let’s review what you’ve learned:
- React and Redux work well together but need more to support React’s UI optimization and Redux’s one-way data flow.
- The
react-redux
library provides React application components access to the Redux store - The
<Provider>
component wraps around the root component to give its descendants access to the - Reduxstore
without props drilling - Selectors are pure functions used to access all or part of the
state
in the Reduxstore
useSelector()
retrieves the applicationstate
through selectors. It must be called from within a componentuseSelector()
subscribes components to data retrieved from the selectors. React, not Redux, re-renders those components when the selected data changesuseDispatch()
returns a reference to Redux storedispatch()
function
Instructions
With all of this new knowledge to work with, explore the finished application to observe how react-redux
helped you implement the Redux one-way data flow.
Have fun!
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.