Is there a way to downgrade React-Native? - react-native

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

Related

How to downgrade react native version after upgrading?

I was building an app on the version 0.70.6 then suddenly I saw the upgrade option after upgrading my app is not working on emulator. So, I want to downgrade the version. Please guide me.
I have tried this npm install react-native#a.b.c . But getting errors.
React Native Upgrade Helper will resolve your problem.
Left column: What's your current react-native version? => The version you want downgrade.
Right column: To which version would you like to upgrade? => The current version you are using.
Copy content in Left column and replace your current code(Right column).

How can I install Storybook for react native?

I have a fresh Expo project and I would like to add Storybook for all the components, the documentation seems deprecated, does anyone know how to install the latest version?
I have just tried the docs and I got Storybook on my Expo project (no longer available).
Answering your question, the package is not deprecated because, I quote,
This community translation has not been updated to the latest version of Storybook yet.
For future reference, during the installation process I faced the following "freeze" using Git Bash, if you get the same just ctrl + c to resume your terminal.

using react-navigation in react-native 0.59.10

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.

error Failed to fetch diff for react-native#x.x.x Maybe it's not released yet? upgrading react-native from 0.59.4 to 0.60.6

I am trying to upgrade from react-native 0.59.4 to 0.60.6 but I am getting below messages:
info Fetching diff between v0.59.4 and v0.60.6...
error Failed to fetch diff for react-native#0.60.6. Maybe it's not released yet?
info For available releases to diff see:
https://github.com/react-native-community/rn-diff-purge#version-changes
This is the command I use:
react-native upgrade 0.60.6
Some say this could be because of proxy configuration but I am not behind a proxy. Any help is appreciated. Cheers.
You can do this as follows.
yarn add react-native #*version*
Pay attention to this.
If you're on a version <= 0.59.10 and want to go to e.g. 0.61, you need to upgrade to 0.60 first, then you can run the upgrader to get up to 0.61.
Found it! Apparently, react-native upgrade command is not working for all versions of react-native. I tried it for version 0.60.0 and it worked.
react-native upgrade 0.60.0
After this running react-native upgrade upgraded to the latest version.
P.S. There will be some files that won't be upgraded automatically. You will need to update them yourself.

Expo: Ejecting to a bare project is only available for SDK 34 and higher

I have a Expo project that I have to eject, due to some native libraries that I must implement. But when i run Expo eject and chose Bare: I'd like a bare React Native project, the console pops up this error:
Ejecting to a bare project is only available for SDK 34 and higher
By searching a bit I understood that expo sdkVersion 34.0.0 is not available yet right? If not, How can I update to it?
Thank you!
I met the same problem as you, I found a link at Expo forum: https://forums.expo.io/t/expo-ejecting-to-a-bare-project-is-only-available-for-sdk-34-and-higher/25528 suggesting to downgrade expo-cli version with
npm i -g expo-cli#2.21.2
if you want to eject to plain react native.
I did so and it works, they said that SDK 34 will be released soon.