An open API service indexing awesome lists of open source software.

https://github.com/lsongdev/fre-routes

📍 simple routes for fre
https://github.com/lsongdev/fre-routes

fre fre-routes

Last synced: 8 months ago
JSON representation

📍 simple routes for fre

Awesome Lists containing this project

README

          

## fre-routes

> simple routes for fre

[![fre-routes](https://img.shields.io/npm/v/fre-routes.svg)](https://npmjs.org/fre-routes)

### Installation

```bash
$ npm install fre-routes
```

### Example

```js
import { h, render } from 'fre'
import { useRoutes, push } from 'fre-routes';

const routes = {
'/': () => (


home


push('/home/jack')}>Go jack

),
'/home/:id': ({ id }) => (

{id}


push('/')}>Go home

),
}

const App = () => useRoutes(routes)

render(, document.getElementById('root'))
```

### Contributing
- Fork this Repo first
- Clone your Repo
- Install dependencies by `$ npm install`
- Checkout a feature branch
- Feel free to add your features
- Make sure your features are fully tested
- Publish your local branch, Open a pull request
- Enjoy hacking <3

### MIT

This work is licensed under the [MIT license](./LICENSE).

---