0.0.17 • Published 11 days ago

swc-router v0.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
11 days ago

Open-Source React + SWC Router ⚡️

NPM Version

Create simple single-page applications (SPA) with ease using swc-router. This lightweight routing solution for React applications leverages the speed of SWC.

Table of Contents

Installation

npm install swc-router

Usage

Basic Routing

Import Router, Route, and Link components:

import { Router, Route, Link } from 'swc-router'

Define your routes using <Router> and <Route>:

<Router>
  <Route path='/' Component={() => <h1>Home</h1>} />
  // Other routes...
</Router>

Navigate between pages using <Link>:

<Link to='/'>Home</Link>

Features

  • Parameterized routing
  • Default 404 route handling
  • Lazy loading support
  • Fully tested with Vitest

Demo

Check out a live demo

License

This project is licensed under the MIT License.

Credits

Special thanks to @midudev for inspiration and guidance.

0.0.17

11 days ago

0.0.14

5 months ago

0.0.15

5 months ago

0.0.16

5 months ago

0.0.13

6 months ago

0.0.12

6 months ago

0.0.11

6 months ago

0.0.10

6 months ago

0.0.9

6 months ago

0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago