Reputation: 209
I am using React Native 0.68.1 with React 18 and I got this error after upgrading:
It works fine with presentational component, but as soon as I change to a smart component with connected function from 'react-redux', it throws the above error.
my packages:
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.68.1",
"react-native-paper": "^4.12.0",
"react-native-safe-area-context": "^4.2.4",
"react-native-screens": "^3.13.1",
"react-native-vector-icons": "^9.1.0",
"react-native-web": "^0.17.7",
"react-redux": "8.0.1",
"@reduxjs/toolkit": "1.8.1",
Upvotes: 2
Views: 3768
Reputation: 44086
The problem are your dependencies. React native is at this point only compatible with react 17, so you will need to downgrade react. Also, you probably should deinstall react-dom, since you are not working in the browser.
Upvotes: 4