Skip to content

Commit cd25f4f

Browse files
authored
[docs] Update upgrade guide for resolution of react-is (#46002)
1 parent 9f4df51 commit cd25f4f

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed

docs/data/material/migration/upgrade-to-v6/upgrade-to-v6.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,63 @@ yarn add react@<version> react-dom@<version>
8888

8989
</codeblock>
9090

91+
### React 18 and below
92+
93+
If you are using React 18 or below, you need to set up a resolution of `react-is` package to the same version as the `react` you are using.
94+
95+
For example, if you are using `[email protected]`, do the following steps:
96+
97+
1. Install `[email protected]`.
98+
99+
<codeblock storageKey="package-manager">
100+
101+
```bash npm
102+
npm install [email protected]
103+
```
104+
105+
```bash pnpm
106+
107+
```
108+
109+
```bash yarn
110+
111+
```
112+
113+
</codeblock>
114+
115+
2. Set the resolutions or overrides in the `package.json`.
116+
117+
<codeblock storageKey="package-manager">
118+
119+
```json npm
120+
{
121+
122+
"overrides": {
123+
"react-is": "^18.3.1"
124+
}
125+
}
126+
```
127+
128+
```json pnpm
129+
{
130+
131+
"overrides": {
132+
"react-is": "^18.3.1"
133+
}
134+
}
135+
```
136+
137+
```json yarn
138+
{
139+
140+
"resolutions": {
141+
"react-is": "^18.3.1"
142+
}
143+
}
144+
```
145+
146+
</codeblock>
147+
91148
### Minimum TypeScript version
92149

93150
The minimum supported version of TypeScript has been increased from v3.5 to 4.7.

docs/data/material/migration/upgrade-to-v7/upgrade-to-v7.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,63 @@ yarn add @types/react@<version> @types/react-dom@<version>
7575
Make sure that your application is still running without errors, and commit the changes before continuing to the next step.
7676
:::
7777

78+
## React 18 and below
79+
80+
If you are using React 18 or below, you need to set up a resolution of `react-is` package to the same version as the `react` you are using.
81+
82+
For example, if you are using `[email protected]`, do the following steps:
83+
84+
1. Install `[email protected]`.
85+
86+
<codeblock storageKey="package-manager">
87+
88+
```bash npm
89+
npm install [email protected]
90+
```
91+
92+
```bash pnpm
93+
94+
```
95+
96+
```bash yarn
97+
98+
```
99+
100+
</codeblock>
101+
102+
2. Set the resolutions or overrides in the `package.json`.
103+
104+
<codeblock storageKey="package-manager">
105+
106+
```json npm
107+
{
108+
109+
"overrides": {
110+
"react-is": "^18.3.1"
111+
}
112+
}
113+
```
114+
115+
```json pnpm
116+
{
117+
118+
"overrides": {
119+
"react-is": "^18.3.1"
120+
}
121+
}
122+
```
123+
124+
```json yarn
125+
{
126+
127+
"resolutions": {
128+
"react-is": "^18.3.1"
129+
}
130+
}
131+
```
132+
133+
</codeblock>
134+
78135
## Breaking changes
79136

80137
Since v7 is a new major release, it contains some changes that affect the public API.

0 commit comments

Comments
 (0)