'React Route for NAVLINK Received TRUE for a non-boolean attribute
I am using Navlink
import { NavLink } from "react-router-dom";
const MainMenu = () => {
return (
<nav className="main-menu d-none d-lg-block">
<ul className="d-flex">
<li>
<NavLink exact to="/">
Home
</NavLink>
</li>
</ul>
</nav>)};
I am getting a warning in my console saying
bundle.js:30762 Warning: Received `true` for a non-boolean attribute `exact`.
If you want to write it to the DOM, pass a string instead: exact="true" or exact={value.toString()}.
at a
at LinkWithRef (http://localhost:3000/static/js/bundle.js:59806:5)
at NavLinkWithRef (http://localhost:3000/static/js/bundle.js:59852:21)
at li
at div
at header
at Header (http://localhost:3000/static/js/bundle.js:11996:91)
at Routes (http://localhost:3000/static/js/bundle.js:60295:5)
at NavScrollTop (http://localhost:3000/static/js/bundle.js:3960:51)
at Wrapper (http://localhost:3000/static/js/bundle.js:4034:78)
at Router (http://localhost:3000/static/js/bundle.js:60228:15)
at BrowserRouter (http://localhost:3000/static/js/bundle.js:59704:5)
at App
Any idea how can I fix it? I tried other stack overflow details but could not come up with anything.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
