@becomes/svelte-router
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Svelte Router

Simple and easy to use Svelte router.

Get started

  • Install the package: @becomes/svelte-router,
  • Add router to the src/app.svelte,
<!-- app.svelte -->

<script lang="ts">
  import { Router } from "@becomes/svelte-router";
  import { RouterContainer } from "@becomes/svelte-router/components";
  import { Home, P404 } from './pages';
  
  Router.register([
    {
      path: '/',
      component: Home,
    }
  ], {
    path: '',
    component: P404
  })
</script>

<RouterContainer />

/@becomes/svelte-router/

    Package Sidebar

    Install

    npm i @becomes/svelte-router

    Weekly Downloads

    4

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    68.5 kB

    Total Files

    19

    Last publish

    Collaborators

    • becomes