@just-web/routes
TypeScript icon, indicating that this package has built-in type declarations

7.1.7 • Public • Published

@just-web/routes

NPM version NPM downloads

@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()
})()

Readme

Keywords

Package Sidebar

Install

npm i @just-web/routes

Weekly Downloads

0

Version

7.1.7

License

MIT

Unpacked Size

20.8 kB

Total Files

32

Last publish

Collaborators

  • unional