I am dispatching alias from content script given in example docs. I got following error.
Actions must be plain objects. Use custom middleware for async actions.
I have used thunk also in proxy store and from there I dispatched it. I checked code in background script, this function throwing error after webpack build. Action is coming undefined.
function dispatch(action) {
if (!isPlainObject(action)) {
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
}
if (typeof action.type === 'undefined') {
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
}
if (isDispatching) {
throw new Error('Reducers may not dispatch actions.');
}
try {
isDispatching = true;
currentState = currentReducer(currentState, action);
} finally {
isDispatching = false;
}
var listeners = currentListeners = nextListeners;
for (var i = 0; i < listeners.length; i++) {
var listener = listeners[i];
listener();
}
return action;
}
Hi,
I am dispatching alias from content script given in example docs. I got following error.
Actions must be plain objects. Use custom middleware for async actions.
I have used thunk also in proxy store and from there I dispatched it. I checked code in background script, this function throwing error after webpack build. Action is coming undefined.