Closed kaushiktd closed 3 months ago
You left out what is probably the most relevant piece here:
const middleware = [
thunk,
// more middleware
];
It's almost definitely the "more middleware" that's the issue.
That said, you really should be using Redux Toolkit to set up the store, not the legacy redux
package:
@markerikson thank you for your reply but i try using reduxjs-toolkit but i encountered a issue
ERROR TypeError: 0, import_redux4.isPlainObject is not a function (it is undefined), js engine: hermes
and i am using "@reduxjs/toolkit": "^2.2.7",
@kaushiktd then there has to be something wrong with your build setup, because we know that Redux Toolkit works (including on React Native).
Either way, the original issue is also not a bug in Redux - somehow you're ending up with something that is undefined
in the middleware array.
Prior Issues
Are there any existing issues or PRs that relate to this problem? If so, link them here.
What is the current behavior?
I am upgrading my expo version from 48 to 51. App buid 100% but after that it gives error in applyMiddleWare() function TypeError: undefined is not a function,
in my configstore.js file
Steps to Reproduce
when i run sudo npx expo start --go then android build 100% but then this issue occur
What is the expected behavior?
the error is resolved and app work fine
Environment Details
Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?
"react-redux": "8.1.1", "redux": "4.2.1", "redux-actions": "2.6.5", "redux-persist": "6.0.0", "redux-thunk": "2.4.1", "expo": "~51.0.6", i am working on macOS
this is my ConfigStore file code