Routers
If you are going with an SPA architecture and your app design includes multiple pages, you'll want to use a router. A router, in this context, is a library that will mimic browser navigation through JavaScript and various native APIs so that the user gets an experience similar to that of a traditional multi-page app. Routers will typically include functionality to:
- Handle navigation actions from within the page
- Match parts of the application to routes
- Manage the address bar
- Manage the browser history
- Manage scroll bar behavior