fxdeniz / vanilla-spa-router

A super simple solution to basic SPA routing in a vanilla JS web app.

Home Page:https://codesandbox.io/s/vanilla-spa-router-59tyx?file=/js/router.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vanilla-spa-router

A vanilla js solution to routing for a single-page application. Watch the corresponding YouTube video.

Try it out

Clone this repo to your machine and start it up in a live server. VSCode has a good extension for this. Then visit the site at localhost on the port your server is running on.

I also created a codesandbox you can try out here. You'll have to refresh the preview browser on first load, but it will work just the same otherwise.

About

A super simple solution to basic SPA routing in a vanilla JS web app.

https://codesandbox.io/s/vanilla-spa-router-59tyx?file=/js/router.js

License:MIT License


Languages

Language:HTML 68.7%Language:CSS 19.3%Language:JavaScript 12.0%