You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside `app/layout.tsx`, import the `AppRouterCacheProvider` and wrap all elements under the `<body>` with it:
33
33
34
34
```diff
35
-
// app/layout.tsx
36
-
+ import { AppRouterCacheProvider } from '@mui/material-nextjs/v13-appRouter'; // or `v14-appRouter` if you are using Next.js v14
35
+
+import { AppRouterCacheProvider } from '@mui/material-nextjs/v13-appRouter';
36
+
// or `v1X-appRouter` if you are using Next.js v1X
37
37
38
38
export default function RootLayout(props) {
39
39
const { children } = props;
@@ -92,7 +92,11 @@ Inside the `pages/_document.tsx` file:
92
92
- Import `DocumentHeadTags` and render it inside the `<Head>`.
93
93
94
94
```diff
95
-
+ import { DocumentHeadTags, documentGetInitialProps } from '@mui/material-nextjs/v13-pagesRouter'; // or `v14-pagesRouter` if you are using Next.js v14
95
+
+import {
96
+
+ DocumentHeadTags,
97
+
+ documentGetInitialProps,
98
+
+} from '@mui/material-nextjs/v13-pagesRouter';
99
+
// or `v1X-pagesRouter` if you are using Next.js v1X
96
100
97
101
export default function MyDocument(props) {
98
102
return (
@@ -109,13 +113,17 @@ Inside the `pages/_document.tsx` file:
The official integration of Material-UI with Next.js. For full documentation, visit [Next.js Integration](material-ui/guides/nextjs/) page.
3
+
The official MaterialUI integration with Next.js. For the full documentation, visit [Next.js integration](https://mui.com/material-ui/guides/nextjs/) page.
0 commit comments