Solid-Router

Solid is a modern JavaScript framework for today's web.

Counter.jsx
import { createSignal } from "solid-js";

function Counter() {
	const [count, setCount] = createSignal(0);

	return (
		<button
		  onClick={() => setCount((n) => n + 1)}
		>
		  Count: {count()}
		</button>
	);
}

Overview

Solid-Router is the universal router for Solid which works for rendering on the client or the server. It was inspired by and combines paradigms of React Router and the Ember Router.

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.