Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the procedure on upgrading React 15.X to React 16.X

Tags:

reactjs

I upgraded from React 15.X to 16.X, but there are so many methods are no longer used, that result the application can’t work as expected. But the application linked with LOTS of old libraries which relay on 15.X. Is this possible to have both React version in the same application? Thanks.

like image 975
DNB5brims Avatar asked Nov 12 '17 01:11

DNB5brims


1 Answers

You'll have to explicitly tell npm to go to the next major version.

npm install --save react@^16.0.0 react-dom@^16.0.0

then run

npm update --save

to get all dependent packages and latest updates for all your packages.

like image 191
philip_nunoo Avatar answered Nov 16 '22 02:11

philip_nunoo