0👍
✅
The problem is this line:
dispatch(newPayload);
Dispatch should be passed two arguments. The first is a string referencing the action name, the second should be the payload.
e.g.
dispatch('actionName', newPayload);
I don’t know what action you’re trying to call so I can’t be more specific.
Source:stackexchange.com