How to add thunk with getDefaultMiddleware and custom middleware #4815
Unanswered
DeepikaSharma5
asked this question in
Q&A
Replies: 1 comment 2 replies
-
your store setup is fine (also thunk: true is the default value so you can remove it). based on the error message you seem to be dispatching an array instead of an action, and none of your middleware/enhancers are intercepting it before it reaches your reducers. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is my current store configuration. But I am getting error as
Error: Actions must be plain objects. Instead, the actual type was: 'array'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples., js engine: hermes
So I tried to add redux-thunk, but still don't know how to configure. Can anyone help me with please.
Beta Was this translation helpful? Give feedback.
All reactions