Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump react to 16.9.0 #27060

Merged
merged 4 commits into from
Oct 31, 2019
Merged

Bump react to 16.9.0 #27060

merged 4 commits into from
Oct 31, 2019

Conversation

pvinis
Copy link
Contributor

@pvinis pvinis commented Oct 30, 2019

Summary

When using npx react-native init Bla, the react version that is installed there is 16.8.1 instead of the recommended 16.9.0.

This PR is to fix that.

Changelog

[General] [Fixed] - Updated React version to 16.9.0

Test Plan

Run npx react-native init Bla using this PR somehow, and see if the correct react version is pulled in.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 30, 2019
@pull-bot
Copy link

pull-bot commented Oct 30, 2019

Warnings
⚠️

❔ Base Branch - The base branch for this PR is something other than master. Are you sure you want to merge these changes into a stable release? If you are interested in backporting updates to an older release, the suggested approach is to land those changes on master first and then cherry-pick the commits into the branch for that release. The Releases Guide has more information.

Generated by 🚫 dangerJS against 2d9bf83

Copy link
Contributor

@radko93 radko93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you might want to sync react-test-renderer version as well?

@pvinis
Copy link
Contributor Author

pvinis commented Oct 30, 2019

🤦‍♂ doing it now

@pvinis
Copy link
Contributor Author

pvinis commented Oct 30, 2019

should I also update the other deps too?

@thymikee
Copy link
Contributor

Please update the metro-react-native-babel-preset to ^0.56.0 as well. Not sure if anything changed since then, because metro-* packages are kept in sync, but it's worth to be on the version used by CLI (which is 0.56)

@pvinis
Copy link
Contributor Author

pvinis commented Oct 30, 2019

Alright, I upgraded the rest of the deps too, to the versions they should be, and I added the lint script since I'm here already.

@cpojer
Copy link
Contributor

cpojer commented Oct 30, 2019

Hey everyone! React inside of RN can only be updated by the React Native team itself because it has some dependencies with FB infra but also because the React specific code in React Native needs to be updated at the same time.

In this case, the release was cut more than two months ago when 16.8.1 was still current. Updating React without updating the renderers will lead to problems and making such a large change in a patch release of a current stable release is very risky.

We will soon update master to React 16.9.0 and the next stable release will ship with that.

I'm curious however, why did this PR receive so many accepts? Is there a blocking bug in the current version of React in React Native that is causing issues?

@cpojer cpojer closed this Oct 30, 2019
@gaearon
Copy link
Collaborator

gaearon commented Oct 30, 2019

Is there a blocking bug in the current version of React in React Native that is causing issues?

FWIW, even if there was, the react package barely contains any code and would be unlikely to fix bugs. The meat of the implementation is in the renderer.

@thymikee
Copy link
Contributor

thymikee commented Oct 30, 2019

It's about this:

"react": "16.9.0"

It turned out, that during the 0.61 release the template wasn't synchronized with the root package.json. This results in legacy init and new init generating projects with different versions of react in package.json.

This caused confusing diffs in the Upgrade Helper. I guess @pvinis can alter the diffs manually again, but this desynchronization shouldn't ever happen.

It's not a breaking change by any means. The [email protected] is already used by:

  1. legacy init
  2. diffs on Upgrade Helper (some needed to be manually updated because they were generated by different versions of init)
  3. the official release notes

@gaearon gaearon reopened this Oct 30, 2019
@gaearon
Copy link
Collaborator

gaearon commented Oct 30, 2019

OK, that was the missing context. Makes sense then. Thanks for explaining!

@cpojer
Copy link
Contributor

cpojer commented Oct 31, 2019

Thanks for the thorough explanation.

@cpojer cpojer merged commit b85dffa into facebook:0.61-stable Oct 31, 2019
@pvinis pvinis deleted the patch-2 branch April 3, 2020 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants