I'm writing a react-native component and I use events but my native module doesn't build on older version of react when sending events were by bridge.eventDispatcher..
So is there a way to check the version to switch between react and react-native modules implementations? Thanks.
If you type react-native --version inside a project, it will tell you the installed version (tested with react-native-cli v. 2.0. 1).
We are excited to release a new version of React Native, 0.70.
So when you write your components, you can check if React. View exists. If it does, you're using React Native. Otherwise, you're using the web version.
check remote version of react-native
npm info react-native version
check version of react-native
npm list --depth=0
remove older version of react-native
npm --save remove react react-native
Install x version of react-native
npm --save [email protected] //maybe 0.30.0
Note that you can use these commands for all modules in node_modules folder. Also you can check your react-native version in package.json file which is in your project.
'Before doing any changes be sure that problem is about incompability between react and react-native version' so had better share complete error log.
If you type react-native --version
inside a project, it will tell you the installed version (tested with react-native-cli
v. 2.0.1).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With