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
I'm trying to render the next-intl Link component as a Mantine Button as you can do with a standard next/linkLink component, however I get the following error:
Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.
It would be great if Link worked as a drop-in replacement for next/link. I don't see anything in the docs suggesting that it shouldn't just work.
Verifications
I've verified that the problem I'm experiencing isn't covered in the docs.
Try to use next-intl's Link component with Mantine's button (as you can with the off-the-shelf next/link Link component)
import{Link}from'@/i18n/routing';import{Button}from'@mantine/core';functionDemo(){return(<Buttoncomponent={Link}href="/hello">
Next link button
</Button>);}
Description
I'm trying to render the next-intl
Link
component as a MantineButton
as you can do with a standardnext/link
Link
component, however I get the following error:It would be great if
Link
worked as a drop-in replacement fornext/link
. I don't see anything in the docs suggesting that it shouldn't just work.Verifications
Mandatory reproduction URL
https://mantine.dev/guides/polymorphic/#polymorphic-components-as-nextjs-link
Reproduction description
Try to use next-intl's
Link
component with Mantine's button (as you can with the off-the-shelf next/linkLink
component)Based on:
https://mantine.dev/guides/polymorphic/#polymorphic-components-as-nextjs-link
Expected behaviour
The
Link
component should just work as it is only a wrapper for next/linkLink
, or the docs should state why it doesn't work.The text was updated successfully, but these errors were encountered: