[core] Support React 17#23311
Conversation
| "**/@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.
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.
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
| "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.
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 react/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
nextrelease 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)