How to use window.hashchange event to implement routing in vanilla javascript

from blog Prahlad Yeri, | ↗ original
The popular wisdom when it comes to implement routing in your client side apps or single page apps (SPA) as they are called these days, is to just grab an “off-the-shelf” framework like angular or vue and start using it. Well, that’s the easy way out but you will never understand the nuts and bolts of how things like routing work at the low...