There are two definitions for routers on the web:
- For the network layer, the router is a networking device that decides data Packets directions. They are distributed by retailers allowing user interaction to the internet.
- For SPA in application layer, router is a Library that decides how web page presents by given URL. This middleware module is used for all URL functions, they are given a path to a file which is rendered to open the next page.
For network layer context:
- Router (computing) on Wikipedia
For SPA in application layer context, most of the popular SPA frameworks has its own routing library: