If an anchor link is clicked in the table of contents but there is not any hash yet in location.href, React Router re-renders the page. This can be prevented using custom event handlers at the expense of interacting with history.pushState by circumventing React Router.
If an anchor link is clicked in the table of contents but there is not any hash yet in
location.href
, React Router re-renders the page. This can be prevented using custom event handlers at the expense of interacting withhistory.pushState
by circumventing React Router.