Hooking into Route Changes in React Router v4
React Router v4 is coming up fast. The first beta was released this week which includes support for hooking into route changes. I needed the ability to run a couple things any time a route changed, so I came up with a simple component that runs as many things as I want when the url is updated.
A couple ideas of what to run on route changes:
We have a refe…
Keep reading with a 7-day free trial
Subscribe to zach.codes to keep reading this post and get 7 days of free access to the full post archives.