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.
react-reduxlibrary provides React application components access to the Redux store
<Provider>component wraps around the root component to give its descendants access to the - Redux
storewithout props drilling
- Selectors are pure function used to access all or part of the
statein the Redux
useSelector()retrieves the application
statethrough selectors. It must be called from within a component
useSelector()subscribes components to data retrieved from the selectors. React, not Redux, re-renders those components when the selected data changes
useDispatch()returns a reference to Redux store
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.