-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
chore: upgrade dependencies + upgrade React types #7138
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-7138--docusaurus-2.netlify.app/ |
Size Change: -121 B (0%) Total Size: 798 kB
ℹ️ View Unchanged
|
Let's try this 👍 Please next time separate regular updates from more impactful ones like React 18 types into 2 separate PRs Notably one is a more risky typings breaking change that may impact user code and also may produce issues with third-party libs used by some users that may rely on React 17 typings (we'll see complains on next release, it's possible we'll have to revert) |
We don't have a strong TypeScript community (from my observation) and have even fewer users who are impacted and don't know how to migrate. Also, we using React v18 only means fewer issues for the consumers, because it enforces explicit Remember, what |
@slorber I don't think this is breaking change. Could you give an example where it breaks things? We don't install |
ok right 👍 if it's only a dev dependency, users should upgrade React types on their own BTW isn't our TypeScript template supposed to declare "@types/react" ? apparently it doesn't |
It's included in Not very ideal but no-one has complained, and ever since |
ok we can keep that, we'll see if it's compatible enough and users can still fix a version if needed 👍 |
Motivation
Most notably, this PR bumps
@types/react
across major versions. Even if we don't use React v18, the types are back-compatible, but much stricter (e.g. got rid of{}
inReactNode
, forbids implicit any inuseCallback
(which catches a few in our own code), etc.), which we will benefit from.Have you read the Contributing Guidelines on pull requests?
Yes