Pseudocode implementing an issue:
import { NavLink, Link } from "react-router-dom";
import { createBrowserHistory } from "history";
export default function App () {
let history = createBrowserHistory();
history.listen(({ location, action }) => {
console.log(location);
});
return (
<>
<nav>
<Link to="/venues">Venues</Link>
<NavLink to="/events">Events</NavLink>
</nav>
</>
)
}
So, history.listen doesn't emit console.log(location) when I go to the links and the URL is changing in the address bar.
But on the page https://reactrouter.com/en/main/start/concepts you write this:
let history = createBrowserHistory();
history.listen(({ location, action }) => {
// this is called whenever new locations come in
// the action is POP, PUSH, or REPLACE
});
Is it an issue?