# hyperapp-hoa-router

> another router with hoa function for hyperapp

Latest version **0.2.7** (published 2018-09-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install hyperapp-hoa-router
pnpm add hyperapp-hoa-router
yarn add hyperapp-hoa-router
bun add hyperapp-hoa-router
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.7 |
| Published | 2018-09-10 |
| First published | 2018-02-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 41.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | gulewei |
| Maintainers | gulewei |
| Keywords | hyperapp, router, hoa |

## Links

- npm: https://www.npmjs.com/package/hyperapp-hoa-router
- Repository: https://github.com/venecy/router
- Homepage: https://github.com/venecy/router#readme
- Issues: https://github.com/venecy/router/issues
- npm.io page: https://npm.io/package/hyperapp-hoa-router

## Dependencies (1)

- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.26.0

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 0.2.7 (latest) — 2018-09-10
- 0.2.6 — 2018-09-10
- 0.2.5 — 2018-09-10
- 0.2.4 — 2018-09-10
- 0.2.3 — 2018-09-10
- 0.2.2 — 2018-09-10
- 0.1.1 — 2018-07-04
- 0.1.0 — 2018-03-15
- 0.0.10 — 2018-03-15
- 0.0.9 — 2018-03-15
- 0.0.8 — 2018-03-15
- 0.0.7 — 2018-03-15
- 0.0.6 — 2018-03-15
- 0.0.5 — 2018-03-15
- 0.0.4 — 2018-02-27
- … 3 more at https://npm.io/package/hyperapp-hoa-router/versions

## README

## A Hyperapp Router

## [Demo](https://venecy.github.io/router/demo/)

## Quick Start

```js
import { app } from 'hyperapp'
import { createHashHistory } from 'history'
import { withRouter, routerFactory } from 'hyperapp-hoa-router'
import App from './components/App'

const history = createHashHistory()

const config = {
  factories: [routerFactory(history)]
}

withRouter(app, config)({}, {}, App, document.body)
```

or

```js
import { app } from 'hyperapp'
import { createHashHistory } from 'history'
import { init, routerFactory } from 'hyperapp-hoa-router'
import App from './App'

init('router')
const router = routerFactory(createHashHistory())
const main = app(
  { router: router.state },
  { router: router.actions },
  App,
  document.body
)
router.sub(main)
```


## Components

  Components are basically identify with [hyperapp/router](https://github.com/hyperapp/router) components

- **Route**

- **Switch**

- **Link**

- **Redirect**


## Dependencies Reference

[Hyperapp](https://github.com/hyperapp/hyperapp): 1 kB JavaScript framework for building web applications.

[History](https://github.com/ReactTraining/history): Easily manage session history anywhere JavaScript runs. Abstracts away the differences in various environments and provides a minimal API that lets you manage the history stack, navigate, confirm navigation, and persist state between sessions.

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