October 2019
Intermediate to advanced
426 pages
11h 49m
English
Next, we are going to adjust the Login component, where we can use the useDispatch Hook. This process is outlined in the following steps:
import { useDispatch } from '../hooks'
const { dispatch } = useContext(StateContext)
const dispatch = useDispatch()
Now the Login component makes use of our custom Hook instead of directly accessing the dispatch function. Next, we are going to adjust the Register component.
Read now
Unlock full access