How to implement URL routing in vanilla JavaScript

from blog Prahlad Yeri, | ↗ original
In this post, I’ll show you how to implement dynamic URL routing in vanilla JavaScript without using any heavy frameworks like angular, vue, react, ember, etc. in less than 30 lines of code! The important attributes you need to know are window.location and more specifically to our purpose, window.location.hash. This built-in property basically...