October 2019
Intermediate to advanced
426 pages
11h 49m
English
The useDispatch Hook returns a reference to the dispatch function that is provided by the Redux store. It can be used to dispatch actions that are returned from action creators. Its API looks as follows:
const dispatch = useDispatch()
We are now going to use the Dispatch Hook to replace the existing container components with Hooks.
After learning how to use the Dispatch Hook, let's move on to migrating our existing components so that they use the Dispatch Hook.
Read now
Unlock full access