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
[core] Support React 17 #23311
[core] Support React 17 #23311
Conversation
@@ -175,6 +175,7 @@ | |||
"**/@babel/types": "^7.10.2", | |||
"**/cross-fetch": "^3.0.5", | |||
"**/dot-prop": "^5.2.0", | |||
"**/react-is": "^16.13.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This avoids pulling in 16 and 17. But I haven't actually verified if yarn
or yarn deduplicate
are that aggressive so I'll catch up on that.
"@types/react": "^16.8.6", | ||
"react": "^16.8.0", | ||
"react-dom": "^16.8.0" | ||
"@types/react": "^16.8.6 || ^17.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These aren't released yet. If npm
and yarn
don't complain on a fresh install we should get this in as well. @types/react@17
is already proposed in DefinitelyTyped/DefinitelyTyped#48971
@@ -52,7 +52,7 @@ | |||
"@material-ui/utils": "^5.0.0-alpha.14", | |||
"clsx": "^1.0.4", | |||
"prop-types": "^15.7.2", | |||
"react-is": "^16.8.0" | |||
"react-is": "^16.8.0 || ^17.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a bit awkward as a direct dependency but should "just work" in practice. More details why this is technically wrong can be found in facebook/react#20099.
On a related note, did you have a look at the React 17 issue in #23215? I could only find one solution, but I'm not 💯% happy with it. Maybe you have some better ideas. |
I'll take a look. Though I would've preferred if the first advise is to not use React 17 yet instead of some timer workarounds. They likely break in more subtle ways. |
I'll investigate #23215 first. Hopefully we can write a test that fails with 17 so we can rely on our nightly tests. |
Allows React 17 as a peer dependency in all packages.
Installing it in the main repo needs a bit more upstream/downstream work. Since we test the
next
release channel daily, it should be fairly safe. Most of the compat issues have already been resolved before 17 was released.Closes #23306
Test plan
2v2 does not allow installs from urls i.e. can't be tested with csb deploys)