Team41Robotics / RoboGuide

Introductory Guide to Java & Robotics Programming
https://team41robotics.github.io/RoboGuide/
0 stars 0 forks source link

Prevent re-render on in-route anchors #21

Open peterapps opened 4 years ago

peterapps commented 4 years ago

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.