I would like to use React Router DOM alongside Flowbite React. I am trying to build a navbar.
import {Link, useLocation} from "react-router-dom";
import {Navbar} from "flowbite-react";
...
const location = useLocation();
...
<Link to="/page">
<Navbar.Link active={location.pathname === "/page"}>
Link
</Navbar.Link>
</Link>
It works, but I got warnings:
react-dom.development.js:86 Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a>.
I understand why it happens (because Link
and Navbar.Link
both contain <a>
), but I have no idea how to fix these warnings.