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
# Material UI - Next.js Pages Router example in TypeScript
2
2
3
-
To launch next app
4
-
> npm run dev
3
+
## How to use
5
4
5
+
Download the example [or clone the repo](https://github.com/mui/material-ui):
6
6
7
-
To connect PlanetSclae
8
-
> pscale connect NOM_DE_BASE main --port 3309
7
+
<!-- #default-branch-switch -->
9
8
10
-
To link the database with prisma to see what happen
11
-
> npx prisma studio
9
+
```bash
10
+
curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/material-ui-nextjs-pages-router-ts
11
+
cd material-ui-nextjs-pages-router-ts
12
+
```
13
+
14
+
Install it and run:
15
+
16
+
```bash
17
+
npm install
18
+
npm run dev
19
+
```
20
+
21
+
or:
22
+
23
+
<!-- #default-branch-switch -->
24
+
25
+
[](https://stackblitz.com/github/mui/material-ui/tree/master/examples/material-ui-nextjs-pages-router-ts)
26
+
27
+
[](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/material-ui-nextjs-pages-router-ts)
28
+
29
+
## The idea behind the example
30
+
31
+
**Note:** This example is set up to use the Next.js Pages Router.
32
+
As of Next.js 13.4, the newer App Router pattern is stable.
33
+
We recommend starting new projects with the [Material UI with Next.js (App Router) example](https://github.com/mui/material-ui/tree/master/examples/material-ui-nextjs-ts) unless you need (or prefer) the Pages Router.
34
+
35
+
The project uses [Next.js](https://github.com/vercel/next.js), which is a framework for server-rendered React apps.
36
+
It includes `@mui/material` and its peer dependencies, including [Emotion](https://emotion.sh/docs/introduction), the default style engine in Material UI v5. If you prefer, you can [use styled-components instead](https://mui.com/material-ui/guides/interoperability/#styled-components).
37
+
38
+
## The link component
39
+
40
+
The [example folder](https://github.com/mui/material-ui/tree/HEAD/examples/material-ui-nextjs-pages-router-ts) provides an adapter for the use of [Next.js's Link component](https://nextjs.org/docs/api-reference/next/link) with MUI.
41
+
More information [in the documentation](https://mui.com/material-ui/guides/routing/#next-js).
42
+
43
+
## What's next?
44
+
45
+
<!-- #default-branch-switch -->
46
+
47
+
You now have a working example project.
48
+
You can head back to the documentation and continue by browsing the [templates](https://mui.com/material-ui/getting-started/templates/) section.
0 commit comments