0.0.17 • Published 1 year ago

swc-router v0.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago