Skip to content

Commit a29e23c

Browse files
[examples] Update Next.js versions to v16 in Next.js examples (DX-57) (#47453)
Co-authored-by: ZeeshanTamboli <[email protected]>
1 parent 9d1bfad commit a29e23c

File tree

21 files changed

+52
-37
lines changed

21 files changed

+52
-37
lines changed

examples/material-ui-nextjs-pages-router-ts/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"@mui/material": "latest",
1818
"@mui/material-nextjs": "latest",
1919
"clsx": "latest",
20-
"next": "^15.0.5",
21-
"react": "latest",
22-
"react-dom": "latest"
20+
"next": "^16.0.7",
21+
"react": "^19.0.0",
22+
"react-dom": "^19.0.0"
2323
},
2424
"devDependencies": {
2525
"@types/node": "latest",

examples/material-ui-nextjs-pages-router-ts/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import Head from 'next/head';
33
import { AppProps } from 'next/app';
4-
import { AppCacheProvider } from '@mui/material-nextjs/v15-pagesRouter';
4+
import { AppCacheProvider } from '@mui/material-nextjs/v16-pagesRouter';
55
import { ThemeProvider } from '@mui/material/styles';
66
import CssBaseline from '@mui/material/CssBaseline';
77
import theme from '../src/theme';

examples/material-ui-nextjs-pages-router-ts/pages/_document.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
DocumentHeadTags,
55
DocumentHeadTagsProps,
66
documentGetInitialProps,
7-
} from '@mui/material-nextjs/v15-pagesRouter';
7+
} from '@mui/material-nextjs/v16-pagesRouter';
88
import theme, { roboto } from '../src/theme';
99

1010
export default function MyDocument(props: DocumentProps & DocumentHeadTagsProps) {

examples/material-ui-nextjs-pages-router-ts/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"moduleResolution": "node",
1313
"resolveJsonModule": true,
1414
"isolatedModules": true,
15-
"jsx": "preserve",
15+
"jsx": "react-jsx",
1616
"jsxImportSource": "@emotion/react",
1717
"incremental": true
1818
},

examples/material-ui-nextjs-pages-router/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"@mui/material": "latest",
1818
"@mui/material-nextjs": "latest",
1919
"clsx": "latest",
20-
"next": "^15.0.5",
21-
"react": "latest",
22-
"react-dom": "latest"
20+
"next": "^16.0.7",
21+
"react": "^19.0.0",
22+
"react-dom": "^19.0.0"
2323
},
2424
"devDependencies": {
2525
"eslint": "latest",

examples/material-ui-nextjs-pages-router/pages/_app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import Head from 'next/head';
3-
import { AppCacheProvider } from '@mui/material-nextjs/v15-pagesRouter';
3+
import { AppCacheProvider } from '@mui/material-nextjs/v16-pagesRouter';
44
import { ThemeProvider } from '@mui/material/styles';
55
import CssBaseline from '@mui/material/CssBaseline';
66
import theme from '../src/theme';

examples/material-ui-nextjs-pages-router/pages/_document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { Html, Head, Main, NextScript } from 'next/document';
3-
import { DocumentHeadTags, documentGetInitialProps } from '@mui/material-nextjs/v15-pagesRouter';
3+
import { DocumentHeadTags, documentGetInitialProps } from '@mui/material-nextjs/v16-pagesRouter';
44
import theme from '../src/theme';
55

66
export default function MyDocument(props) {

examples/material-ui-nextjs-pages-router/pages/about.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function About() {
1212
<Container maxWidth="sm">
1313
<Box sx={{ my: 4 }}>
1414
<Typography variant="h4" component="h1" sx={{ mb: 2 }}>
15-
Material UI - Next.js example
15+
Material UI - Next.js example in JavaScript
1616
</Typography>
1717
<Button variant="contained" component={Link} noLinkStyle href="/">
1818
Go to the main page

examples/material-ui-nextjs-pages-router/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function Index() {
1111
<Container maxWidth="sm">
1212
<Box sx={{ my: 4 }}>
1313
<Typography variant="h4" component="h1" sx={{ mb: 2 }}>
14-
Material UI - Next.js example
14+
Material UI - Next.js example in JavaScript
1515
</Typography>
1616
<Link href="/about" color="secondary">
1717
Go to the about page
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
import './.next/dev/types/routes.d.ts';
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)