Simply create Single Page Applications using JS-Router.
React Router is a default library used while working with Single Page Applications(SPA) in React.
Ever tried building a SPA using Vanilla JavaScript?
Js-router
will take care of the routing side of creating SPA. It's easy to use and available on npm for installation.
I tried to implement Routing in a single page application using Vanilla JavaScript. Live Demo Source Code
- Navigate throughout the SPA, WITHOUT page re-load
- PrivateRoutes implemented
- History [You can go back and forth with the links]
- Redirects if not authenticated.
- 404 page, for wrong links
- Authentaication for Private Routes.