Upgrade to React v16. 馃帀
+1
There's nothing that needs to be done on our side.
If you create a new project you already get React 16.
If you have an existing project, follow the instructions in our blog post:
yarn add react@^16.0.0 react-dom@^16.0.0
or
npm install --save react@^16.0.0 react-dom@^16.0.0
That's it! Cheers.
@gaearon I understand that the tool will install latest React by default (which actually could be problematic for some users that intend to depend on some v15-only modules, e.g., that still use React.PropTypes
, though those users can downgrade manually after creating their app).
But there are references to React v15, e.g. the devDependencies
of react-scripts
: https://github.com/facebookincubator/create-react-app/blob/2e82ebb3371731a5c4e346f310848ddb23fd0976/packages/react-scripts/package.json#L61
Regarding your point about PropTypes, it would be more confusing if the tool installed a different version of React than the one documented on the website. We'd have to switch at some point anyway, and now is the most logical time to do it.
You're right about the development dependencies but they don't affect our users. We will update them soon.
@gaearon Thanks, thought maybe this issue would help drive the effort to update the dev deps.
Think it's not worth pursuing an optional command line argument and/or other configuration specifying which React version to install?
Let's open a separate issue for updating devDeps? I'm sure people will think this is about updating their apps to React 16 by the title and I want to ensure this issue contrains simple advice and stays closed.
Most helpful comment
There's nothing that needs to be done on our side.
If you create a new project you already get React 16.
If you have an existing project, follow the instructions in our blog post:
or
That's it! Cheers.