Hello, I was porting my react native vanilla project to expo while this error appeared:
_react[“default”].memo is not a function. (In ‘_react[“default”].memo(ConnectFunction)’, ‘_react[“default”].memo’ is undefined)
Thank you in advance
You need to use the appropriate fork of RN for whatever SDK version your Expo project is running. Hooks are not available in Expo yet. You can find said fork here: https://docs.expo.io/versions/v32.0.0/workflow/upgrading-expo-sdk-walkthrough/
Thanks @adamjnav, these are my npm packages:
What should I do?
I have exactly the same settings in package.json… and same error occurred.
Do any of your other dependencies rely or expect RN 0.59/Hooks compatibility?
I think it happens because of Hooks. From v.7.0.1 react-redux
connect now uses React.memo() internally, which returns a special
object rather than a function.
And it’s rewritten with Hooks. Downgrading react-redux to v.6.0.0 helps.
Got that solution from here https://stackoverflow.com/a/55693526/4588517
@jkhusanov exactly, you’re right, downgrading react-redux to v.6.0.1 solved this problem.
Glad we got to the bottom of it! Thanks for sharing the answer with us @jkhusanov!
I’m just learning react. Until this problem gets solved: What are the correct (recommended) steps to take in order to downgrade react-redux to v.6.0.1?. I allready uninstalled and intalled v6.0.1 but that did not worked.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.