October 2019
Intermediate to advanced
426 pages
11h 49m
English
Now that we have learned about the Dispatch Hook, let's see it in action by implementing it in our AddTodo component.
Let's migrate the AddTodo component to Hooks now:
import { useDispatch } from 'react-redux'
import { addTodo } from '../actions'
export default function AddTodo () {
const dispatch = useDispatch()
function handleAdd () { if (input) ...Read now
Unlock full access