@just-web/routes is a plugin that provides client side routing capability.
# npm
npm install @just-web/routes
# yarn
yarn add @just-web/routes
# pnpm
pnpm install @just-web/routes
#rush
rush add -p @just-web/routes
Since routing is a basic functionality of an application, you typically will load it statically:
import { createApp } from '@just-web/app'
import routesPlugin from '@just-web/routes'
void (async () => {
const app = await createApp({ name: 'my-awesome-app' })
.extend(routesPlugin())
app.routes.register('/', () => { ... })
app.routes.register('/error', () => { ... })
await app.start()
})()
Generated using TypeDoc