Proper way to use next/link with flowbite-react #592
|
Hey guys, |
Replies: 2 comments 4 replies
|
Any update here? |
|
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. |
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.