Routing

Alternative Routers

Edit this page

Outside of the default browser router, Solid Router also provides hash and memory routers for different use cases.


Hash Mode Router

By default, Solid Router uses location.pathname as route path. You can simply switch to hash mode through the source property on <Router> component.

import { HashRouter } from "@solidjs/router";
<HashRouter />;

Memory Mode Router

You can also use memory mode router for testing purpose.

import { MemoryRouter } from "@solidjs/router";
<MemoryRouter />;
Report an issue with this page