React Native Renderer - Locking on react patch version? #299
-
Hi everyone, here at OEBB we have in our project setup the new architecture enabled with the following dependency resolution strategy for react & react-native: {
....
"dependencies": {
"react": "~19.1.0",
"react-native": "~0.80.0"
}
....
} This causes the error message "Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got: react: 19.1.1 and react-native-renderer 19.1.0". By using strict react 19.1.0 this error doesn't happen. This error didn't occur with react 19.0 in our setup as react had no patch version for the 19.0 release. As we discovered this check was introduced with react-native 0.78 (https://github.com/facebook/react-native/blob/v0.78.0/packages/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js#L16812). Is there any specific reason for also checking/locking on the patch version of react? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That resolution strategy is not supported. You should be using the version of React that is dictated by React Native. More on this here https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Renderer/README.md#react--react-native-versions |
Beta Was this translation helpful? Give feedback.
That resolution strategy is not supported. You should be using the version of React that is dictated by React Native. More on this here https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Renderer/README.md#react--react-native-versions