Routing in SolidEdit this page
The docs are based on Solid Router v0.10.x. To use this version, you need to have Solid v1.8.4 or later installed.
A router provides a way to change a user's view based on the URL in the browser. This allows a "single-page" application to simulate a traditional multipage site. To use Solid Router, components called Routes that depend on the value of the URL (the "path") are specified, and the router handles the mechanism of swapping them in and out.
To get started with Solid Router, install it using your preferred package manager.
Configure the Routes
To configure your routes, import the
Router component and then start the application by rendering the router component.
This sets up the router that will match on the url and render the appropriate route.