Proper way to use next/link with flowbite-react #592
-
Hey guys, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Any update here? |
Beta Was this translation helpful? Give feedback.
-
We haven't got this feature on every component, but you can cast many components to any generic component and pass its props. For example, see https://github.com/themesberg/flowbite-react/blob/main/src/components/Sidebar/SidebarItem.tsx#L83. You can implement this as import Link from "next/link";
<Sidebar.Item as={Link} href="/" prefetch={false}>Next.js Link</Sidebar.Item> If you find a component that should have this but you can't, please do create an issue and we'll fix that up. |
Beta Was this translation helpful? Give feedback.
We haven't got this feature on every component, but you can cast many components to any generic component and pass its props.
For example, see https://github.com/themesberg/flowbite-react/blob/main/src/components/Sidebar/SidebarItem.tsx#L83. You can implement this as
If you find a component that should have this but you can't, please do create an issue and we'll fix that up.