@just-web/routes
v7.1.7
Published
just-web routes library
Downloads
12
Readme
@just-web/routes
@just-web/routes is a plugin that provides client side routing capability.
NOTE: This plugin is still in development and is not ready for production use.
Features
- routing
- history
Install
# 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
Basic usage
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()
})()