Skip to content

Commit cac5df0

Browse files
arminmehflaviendelanglecherniavskiiLukasTy
authored
React 19 support (mui#15342)
Signed-off-by: Armin Mehinovic <4390250+arminmeh@users.noreply.github.com> Co-authored-by: flavien <flaviendelangle@gmail.com> Co-authored-by: Andrew Cherniavskii <andrew.cherniavskii@gmail.com> Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com>
1 parent 53d9437 commit cac5df0

52 files changed

Lines changed: 315 additions & 267 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ parameters:
1313
description: The name of the workflow to run
1414
type: string
1515
default: pipeline
16+
with-material-ui-6:
17+
description: Use material-ui v6 for additional checks and tests
18+
type: boolean
19+
default: false
20+
with-react-version:
21+
description: The version of react to be used for the additional tests
22+
type: string
23+
default: stable
1624
e2e-base-url:
1725
description: The base url for running end-to-end test
1826
type: string
@@ -90,11 +98,10 @@ commands:
9098
git --no-pager diff HEAD
9199
92100
- when:
93-
condition:
94-
equal: [material-ui-v6, << pipeline.parameters.workflow >>]
101+
condition: << pipeline.parameters.with-material-ui-6 >>
95102
steps:
96103
- run:
97-
name: Install @mui/material@next
104+
name: Install @mui/material v6
98105
command: pnpm use-material-ui-v6
99106

100107
jobs:
@@ -349,50 +356,38 @@ workflows:
349356
requires:
350357
- checkout
351358

352-
react-next:
359+
additional-tests:
353360
when:
354-
equal: [react-next, << pipeline.parameters.workflow >>]
355-
# triggers:
356-
# - schedule:
357-
# cron: '0 0 * * *'
358-
# filters:
359-
# branches:
360-
# only:
361-
# - master
361+
and:
362+
- equal: [additional, << pipeline.parameters.workflow >>]
363+
- or:
364+
- equal: [true, << pipeline.parameters.with-material-ui-6 >>]
365+
- not:
366+
equal: ['stable', << pipeline.parameters.with-react-version >>]
362367
jobs:
363368
- test_unit:
364369
<<: *default-context
365-
react-version: next
366-
name: test_unit-react@next
370+
name: test_unit_additional
371+
react-version: << pipeline.parameters.with-react-version >>
367372
- test_browser:
368373
<<: *default-context
369-
react-version: next
370-
name: test_browser-react@next
374+
name: test_browser_additional
375+
react-version: << pipeline.parameters.with-react-version >>
371376
- test_regressions:
372377
<<: *default-context
373-
react-version: next
374-
name: test_regressions-react@next
378+
name: test_regressions_additional
379+
react-version: << pipeline.parameters.with-react-version >>
375380
- test_e2e:
376381
<<: *default-context
377-
react-version: next
378-
name: test_e2e-react@next
382+
name: test_e2e_additional
383+
react-version: << pipeline.parameters.with-react-version >>
379384

380-
material-ui-v6:
385+
additional-checks:
381386
when:
382-
equal: [material-ui-v6, << pipeline.parameters.workflow >>]
387+
and:
388+
- equal: [additional, << pipeline.parameters.workflow >>]
389+
- equal: [true, << pipeline.parameters.with-material-ui-6 >>]
383390
jobs:
384-
- test_unit:
385-
<<: *default-context
386-
name: test_unit-material@next
387-
- test_browser:
388-
<<: *default-context
389-
name: test_browser-material@next
390-
- test_regressions:
391-
<<: *default-context
392-
name: test_regressions-material@next
393-
- test_e2e:
394-
<<: *default-context
395-
name: test_e2e-material@next
396391
- test_types:
397392
<<: *default-context
398-
name: test_types-material@next
393+
name: test_types_additional

docs/data/charts/getting-started/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ yarn add @mui/material @emotion/react @emotion/styled
4141

4242
```json
4343
"peerDependencies": {
44-
"react": "^17.0.0 || ^18.0.0",
45-
"react-dom": "^17.0.0 || ^18.0.0"
44+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
45+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
4646
},
4747
```
4848

docs/data/data-grid/custom-columns/cell-renderers/rating.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function EditRating(props: GridRenderEditCellParams<any, number>) {
4646
changedThroughKeyboard.current = false;
4747
};
4848

49-
const handleRef = (element: HTMLElement | undefined) => {
49+
const handleRef = (element: HTMLElement | null) => {
5050
if (element) {
5151
if (value !== 0) {
5252
element.querySelector<HTMLElement>(`input[value="${value}"]`)!.focus();

docs/data/data-grid/getting-started/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht
3535

3636
```json
3737
"peerDependencies": {
38-
"react": "^17.0.0 || ^18.0.0",
39-
"react-dom": "^17.0.0 || ^18.0.0"
38+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
39+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
4040
},
4141
```
4242

docs/data/date-pickers/getting-started/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ yarn add @mui/material @emotion/react @emotion/styled
5858

5959
```json
6060
"peerDependencies": {
61-
"react": "^17.0.0 || ^18.0.0",
62-
"react-dom": "^17.0.0 || ^18.0.0"
61+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
62+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
6363
},
6464
```
6565

docs/data/tree-view/getting-started/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht
4444

4545
```json
4646
"peerDependencies": {
47-
"react": "^17.0.0 || ^18.0.0",
48-
"react-dom": "^17.0.0 || ^18.0.0"
47+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
48+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
4949
},
5050
```
5151

packages/x-charts-pro/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ This component has the following peer dependencies that you need to install as w
1616
```json
1717
"peerDependencies": {
1818
"@mui/material": "^5.15.14 || ^6.0.0",
19-
"react": "^17.0.0 || ^18.0.0",
20-
"react-dom": "^17.0.0 || ^18.0.0"
19+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
20+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
2121
},
2222
```
2323

packages/x-charts-pro/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
"@emotion/styled": "^11.8.1",
5656
"@mui/material": "^5.15.14 || ^6.0.0",
5757
"@mui/system": "^5.15.14 || ^6.0.0",
58-
"react": "^17.0.0 || ^18.0.0",
59-
"react-dom": "^17.0.0 || ^18.0.0"
58+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
59+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
6060
},
6161
"peerDependenciesMeta": {
6262
"@emotion/react": {

packages/x-charts/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ This component has the following peer dependencies that you need to install as w
1616
```json
1717
"peerDependencies": {
1818
"@mui/material": "^5.15.14 || ^6.0.0",
19-
"react": "^17.0.0 || ^18.0.0",
20-
"react-dom": "^17.0.0 || ^18.0.0"
19+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
20+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
2121
},
2222
```
2323

packages/x-charts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
"@emotion/styled": "^11.8.1",
5656
"@mui/material": "^5.15.14 || ^6.0.0",
5757
"@mui/system": "^5.15.14 || ^6.0.0",
58-
"react": "^17.0.0 || ^18.0.0",
59-
"react-dom": "^17.0.0 || ^18.0.0"
58+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
59+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
6060
},
6161
"peerDependenciesMeta": {
6262
"@emotion/react": {

0 commit comments

Comments
 (0)