SyntaxFix
Write A Post
Hire A Developer
Questions
This error can also occur when you make the mistake of declaring useDispatch from react-redux the wrong way: when you go: const dispatch = useDispatch instead of: const dispatch = useDispatch(); (i.e remember to add the parenthesis)
const dispatch = useDispatch
const dispatch = useDispatch();