smolter
Types

NavigationRouterOptions

Initial URL and browser-history options for navigation-only routing.

Compatibility

ReactAvailable in this renderer's browser integration.
React SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
PreactAvailable in this renderer's browser integration.
Preact SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.

Import from @kasperrt/smolter/react @kasperrt/smolter/preact

Signature

type NavigationRouterOptions = Pick<RouterOptions, "url" | "browser">;

Contract

url resolves relative to http://localhost outside a browser. browser defaults to false; when true in a browser, the default URL comes from location.href. Data hydration is not supported; use createDataRouter for it.

createRouter(routes, { browser: true });
View implementation ↗