# inferno-route

> Another routing library for [Inferno](https://github.com/infernojs/inferno).

Latest version **1.1.20** (published 2017-01-25) · 0 weekly downloads

## Install

```sh
npm install inferno-route
pnpm add inferno-route
yarn add inferno-route
bun add inferno-route
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.20 |
| Published | 2017-01-25 |
| First published | 2017-01-19 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | wizawu |

## Links

- npm: https://www.npmjs.com/package/inferno-route
- Repository: https://github.com/wizawu/inferno-route
- Homepage: https://github.com/wizawu/inferno-route#readme
- Issues: https://github.com/wizawu/inferno-route/issues
- npm.io page: https://npm.io/package/inferno-route

## Recent versions

- 1.1.20 (latest) — 2017-01-25
- 1.1.18 — 2017-01-23
- 1.1.16 — 2017-01-23
- 1.1.14 — 2017-01-23
- 1.1.12 — 2017-01-21
- 1.1.10 — 2017-01-21
- 1.1.8 — 2017-01-21
- 1.1.6 — 2017-01-19
- 1.1.4 — 2017-01-19
- 1.1.2 — 2017-01-19
- 1.1.0 — 2017-01-19
- 1.0.2 — 2017-01-19

## README

# inferno-route

Another routing library for [Inferno](https://github.com/infernojs/inferno).

* Incredibly lightweight (with only 1 component `Route`)
* TypeScript friendly

### Installation

```
npm install --save inferno-route
```

### Usage

```
import Component from "inferno-component"
import Route from "inferno-route"

class User extends Component<any, {}> {
    render() {
        return this.props.params.id
    }
}

// Set your entry point, like "#/", "#/1/2", "#/users/wizawu"
if (!window.location.hash) window.history.replaceState(null, null, "#/")

Inferno.render((
    <Route path="#" component={Root}>
        <Route path="1" component={First}>
            <Route path="2" component={Second}>
                <Route path="3" component={Third} />
            </Route>
        </Route>
        <Route path="users/:id" component={User} />
        <Route path="profile/.*" component={Profile} />
    </Route>
), document.body.firstChild)
```

### Issues

Please email to [wizawu@gmail.com](mailto:wizawu@gmail.com). Open source soon.

---
_Source: https://npm.io/package/inferno-route · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
