-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Open
Labels
docsImprovements or additions to the documentation.Improvements or additions to the documentation.nextjsscope: linkChanges related to the link.Changes related to the link.
Description
Current behavior 😯
Currently the way its suggested to integrate MUI Link to NextJS Link component is use the example in
https://github.com/mui-org/material-ui/blob/ec5df5f94f472628103eb1cfbecccc6afc2658bd/examples/nextjs-with-typescript/src/Link.tsx
Expected behavior 🤔
https://stackoverflow.com/a/66228870
This basically, gives the same functionality, without the overhead.
import NextLink from 'next/link'
import MuiLink from '@material-ui/core';
<NextLink href="/" passHref>
<MuiLink>MyLink</MuiLink>
</NextLink>
Steps to reproduce 🕹
https://stackoverflow.com/a/66228870
vs
https://github.com/mui-org/material-ui/blob/ec5df5f94f472628103eb1cfbecccc6afc2658bd/examples/nextjs-with-typescript/src/Link.tsx
Context 🔦
What's the recommended way of using Mui Link with NextJs Link.
Your environment 🌎
`npx @mui/envinfo`
.. ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```oliviertassinari
Metadata
Metadata
Assignees
Labels
docsImprovements or additions to the documentation.Improvements or additions to the documentation.nextjsscope: linkChanges related to the link.Changes related to the link.