Home
This is my vanilla JavaScript router sandbox using a single page application (SPA). I had to play around with the code to see how the JS router works. I recommend looking at the source code line by line to help you learn.
It's also recommended you get a good understanding pushState and popstate.
You can also view my pushState vs popstate demo.
I need to give a shout out to mitchwadair and thedevdrawer and their respective JavaScript router tutorials. Click on their links to view their GitHub repos and YouTube tutorials.