I have a component I'm trying to build pagination functionality for
<PageNumber>
<StyledLink to="/visited/page/1">1</StyledLink>
<StyledLink to="/visited/page/2">2</StyledLink>
</PageNumber>
so when I click the link it should change the path (which it does)
the problem is my component does not re-render so I can't seem to then display page 2 (even though the route has changed)
how can I listen to the changes in my component? I'm using hooks
I've searched the docs and all the options seem to indicate you should only listen to route changes using LocationProvider
and stuff for testing
<Router>
<Visited path="visited/page/:id" />
<AllCountries path="all" />
<Map path="map" />
<Redirect from="visited" to="page/1" />
</Router>