October 2019
Intermediate to advanced
426 pages
11h 49m
English
Then, we are going to adjust the Logout component to use both the useUserState and the useDispatch Hooks with the following steps:
import { useDispatch, useUserState } from '../hooks'
const dispatch = useDispatch() const user = useUserState()
Now the Logout component makes use of our custom Hooks instead of directly accessing the user state and the dispatch function.
Read now
Unlock full access