Action Dispatch
Explore how to dispatch actions within the User component to update the active user in the Redux store. Understand the setup of click handlers, import of action creators, and the process of dispatching actions, preparing you for managing state changes with reducers.
We'll cover the following...
We'll cover the following...
In the last lesson we made the action creator called setActiveUserID, which returns the user object based on the id it is given.
Now we must dispatch the action.
Let’s keep moving.
Take a look at the User.js component.
The first line of the return statement is a div with the class name, User: ...