enter image description hereI have completely installed my react router and my project is build completely but the only issue is that when I imported this
import {
BrowserRouter as Router,
Switch,
Route,
Link
} from "react-router-dom";
the Link
is in light color in vs code compared to others that means that means it is not imported and thus I cannot replace anchor tag and href with Link to="".
Anyone can please help with the solution because without these I cannot continue further.
2
Answers
Close the Link tag in
Navbar.js
in line 9 of
Navbar.js
and in line 16 of
Navbar.js
The Link module imported in
App.js
is not yet usedthat’s why it is in light color.
ProTip: If you are not using Link module in
App.js
, just remove the import