Hello, React developers, If You don’t want to use React 17 as of now then? In This article, we are going to learn about How to downgrade React version 16 to 15? let’s start this article.
How to downgrade React version 16 to 15?
How to downgrade React version 16 to 15?
To downgrade React version 16 to 15 First Of all, Open Your package.json file Search For react and react-dom under dependencies, and change both package versions to 15.6.0. Just Like given below: “react”: “^15.6.0”, “react-dom”: “^15.6.0”, Now, run npm install. And now Your React Version is changed to React 16. Thank You.
downgrade React version 16 to 15
To downgrade React version 16 to 15 If You Don’t want to use React 17 Then Just downgrade to react 16 Just run this command in your terminal: npm install –save react@15.6.0 react-dom@15.6.0 Now, Your react version is downgraded to React 16. Thank you.
Method 1: Changing package.json
First Of all, Open Your package.json file Search For react and react-dom under dependencies, and change both package versions to 15.6.0. Just Like given below.
"dependencies": {
"react": "^15.6.0",
"react-dom": "^15.6.0",
...
},
Now, run npm install.
npm install
And now Your React Version is changed to React 17. Thank You.
Method 2: Using Commandline
If You Don’t want to use React 17 Then Just downgrade to react 16 Just run this command in your terminal.
npm install --save react@15.6.0 react-dom@15.6.0
Now, Your react version is downgraded to React 16. Thank you.
Method 3: Run This Command
Just uninstall the react 16 and install the react 15
npm uninstall react
Then install React 15 Just run this command
npm install react@15.6.0
Conclusion
It’s all About this article. Hope this method worked for you. Comment below Your thoughts and your queries. Also, Comment below which method worked for you?
Also, Read