Gluon browser package · 1.10.0
@gluonjs/router
The official Gluon router with browser, hash, and memory histories.
Install and start
Install the public package at the same version as the rest of the Gluon train:
npm install @gluonjs/routerimport { createRouter } from '@gluonjs/router';
const router = createRouter({
routes: [{ path: '/', component: () => import('./home.js') }],
});Purpose
Official Gluon router with browser, hash, and memory histories.
Use cases
- Named routes, guards, lazy routes, and scroll restoration.
- Browser, hash, and memory history strategies.
- Application bindings that share the Gluon runtime context.
Public entry points
Only these package exports are part of the supported public boundary.
Dependencies and peers
Installed dependencies
- @gluonjs/core · runtime dependency
- @gluonjs/reactivity · runtime dependency
Peer dependencies
- @gluonjs/core@1.10.0 · optional
- @gluonjs/reactivity@1.10.0
API reference
Open an entry point above for generated symbol documentation and a reviewed example for every public symbol. Application code must import from this package entry point, never from repository source paths.
Scope and limits
- Does not own component rendering or application state storage.
- History selection and guards live at the router boundary.
Related guides
Verified integration notes
- Depends on `@gluonjs/core` and `@gluonjs/reactivity`.
- Package exports `.` and `./memory`.