Detect React Route Change in Vanilla JavaScript

Raja Osama
Feb 11, 2021

Hi! You are here because you have been looking for a solution to detect a route change in your SPA. So, how would you detect that the page has been changed? Since there is no navigation as well as no event for the URL change in the SPA, we need to come up with our own solution and implement our own logic.

Sorry Article Moved from medium : Detect React Route Change in Vanilla JavaScript (rajaosama.me)

--

--

Raja Osama

πŸ‘‹ Hi, I'm Raja Osama, a polyglot rockstar software engineer who loves to create fascinating applications using JavaScript-based tech stack. πŸ’»