-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Fix migration feedback #35232
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,19 +71,36 @@ If you need to support IE 11, check out our [legacy bundle](/material-ui/guides/ | |
|
||
## Update React & TypeScript version | ||
|
||
### Update React | ||
|
||
The minimum supported version of React has been increased from v16.8.0 to v17.0.0. | ||
|
||
If you are using a React version below 17.0.0, update your packages to at least v14.11.2 for Material UI and v17.0.0 for React. | ||
|
||
With npm: | ||
|
||
```sh | ||
npm update @material-ui/core@^4.11.2 react@^17.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
``` | ||
|
||
With yarn: | ||
|
||
```sh | ||
yarn upgrade @material-ui/core@^4.11.2 react@^17.0.0 | ||
``` | ||
|
||
### Update TypeScript | ||
|
||
The minimum supported version of TypeScript has been increased from v3.2 to v3.5. | ||
|
||
:::warning | ||
:::info | ||
We try to align with types released by [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) (i.e. packages published on npm under the `@types` namespace). | ||
|
||
We will not change the minimum supported version in a major version of Material UI. | ||
|
||
We will not change the minimum supported version in a minor version of Material UI. | ||
However, we generally recommend not to use a TypeScript version older than the lowest supported version of DefinitelyTyped. | ||
::: | ||
|
||
If your project includes these packages, you'll need to update them to the `latest` version: | ||
If your project includes these packages, you'll need to update them: | ||
|
||
- `react-scripts` | ||
- `@types/react` | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Off-topic
@mui/core I almost wonder if we shouldn't have moved in this direction: #25464. Most seems to keep the support of React 16.8.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.
Honestly, if we support 17, I don't see why we shouldn't support 16.8. But we would need to probably add additional tests for it. I wonder if people still use it honestly
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.
@mnajdova based on https://www.npmjs.com/package/react-dom?activeTab=versions I could cover an extra 7797292 weekly downloads of React DOM (downloads >=v16.8.0 && < v17.0.0). So with Material UI v5, we exclude 45% of the today's React DOM downloads.
We have tests for React 17 in
material-ui/.circleci/config.yml
Line 832 in 90d6a3b
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.
Probably this means that it was a bad decision on my side to create this check as "non blocking" on the PR CI.
I am not sure that this is that much black/white. If someone is not aiming to update React, it's likely that they are not going to update their UI library dependency either, so they may be depending on v4. But agree, it is a big percentage, so it may be worth checking what would take for us to support v16.8.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.
@mnajdova I think that a nice workaround could be to run this step randomly on PRs. This way, we get the feedback every now and then, without slowing down the CI too much.
This could be why v4 is still this high in downloads, too many have to first upgrade React, but they might not because some other libraries are not compatible with React 17 yet. I have created a live app with Toolpad to better visualize v16.8 use, with live data: https://master--toolpad.mui.com/deploy/clcdobvof0008n99jpx86fede/pages/331kqzd
It seems to have been down during the holidays period.
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.
Ok, let's bring this up with the team.