I'm making a project with react-native 0.59.10
when I wanna install reac-navigation, react-native-gesture-handler and react-native-reanimated .
I got error and project does not built, should I use a specific version of each of them?
Since you are using react-native 0.59.10 latest versions of that libraries might not be compatible.
According to your requirements,
react-native-gesture-handler version between 1.1.0 & 1.4.0. Check this official documentation for more information.
react-navigation requires react-native#^0.54.x. Since react-navigation#3.x depends on the new React.createContext API, which was added in react#16.3.x.
Related
I have react-native version 0.69.0, but Expo SDK 45 only works with react-native 0.68.2. Is there a way to downgrade my project to this version?
I think this stackoverflow question by 'Sathyakumar Seshachalam' may help you.
link: Proper mechanism to downgrade react-native
Answer from chetan and liamnickell:
For existing projects if you want to install/downgrade to lower version
npm install react-native#a.b.c
This will install the version specified.
Check the installed version with react-native --version
I want to use native-base but i do not want to install react-native link. How can i do this?
The reason i do not want to install react-native link is because react-native doc suggest us to delete react-native CLI globally.
I guess you have misunderstanding of what react-native link does. react-native link is an automatic way for installing native dependencies. read more here
In case of Native Base. This library is consist of other npm packages, so you need to install them in order to work properly with Native Base.
Native Base Docs states
Install Peer Dependencies
The peer dependencies included from any npm packages does not automatically get installed. Your application will not depend on it explicitly. read more here
If your react-native version is 0.60+ you do not need to link dependencies. All you need to do is install dependencies and you are good to do.
I am currently at React Native version 0.59.2 but I would like to update my project to 0.60.5. I noticed that it now uses autolinking (pods for iOS) for the installed dependencies as opposed to using the react-native link(ing) anymore.
What would be the most efficient way to upgrade to this latest version? Would I delink all the dependencies I currently have?
How would I generate the Podfile, and do I need to include all the dependencies in there?
here is the proper way to upgrade your project's react-native version
please follow this:- https://react-native-community.github.io/upgrade-helper/
In my cases when i link third party module in react native like..
npm install react-native-vector-icons --save.
react-native link
It gives message for me....
React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:-
react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")
but if i am not link the module it will not work for me
this problem occurs only in react-native new upgraded version(0.60) not for older version.
please suggest me any solution for the given problem.
Always make sure to install any third party library manually rather than doing react-native link.
Follow the detailed manual installation https://github.com/oblador/react-native-vector-icons from here.
Firstly run this command react-native unlink react-native-vector-icons
After unlink is successful, follow the manual installation steps.
Also it's better to use yarn (https://yarnpkg.com/en/) over npm while installing a package.
Hope this helps!
Since react native 0.60 auto-linking is avaliable so that means that future libraries release won't need to run the "link" command. If you're using vector-icons you'll need to wait until the upgrade. You can use the vector icons linked to you project normally, but be careful because that will not be compatible in the next major release in react native. I also tried to upgrade to react native 0.60.3, but this is not the great idea if your using a lot of dependencies.
How to find the current/latest available version and subversion of react native from the web? 0.41.0, 0.41.1, 0.41.2 etc
Not this react-native --version, as this finds the version of the current project.
You can try: npm show react-native version. The current result is
0.41.2