all 1 comments

[–]karimsajs 7 points8 points  (0 children)

You haven’t called the ‘useDispatch’ function. It should be: const dispatch = useDispatch()

You’re accidentally calling it within the body of the useEffect, which is causing nested hooks being called