# choo-redirect

> Redirect a view to another view

Latest version **2.0.0** (published 2017-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install choo-redirect
pnpm add choo-redirect
yarn add choo-redirect
bun add choo-redirect
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-05-20 |
| First published | 2016-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | emilbayes, yoshuawuyts |
| Keywords | redirect, choo, view, bel, framework |

## Links

- npm: https://www.npmjs.com/package/choo-redirect
- Repository: https://github.com/yoshuawuyts/choo-redirect
- Homepage: https://github.com/yoshuawuyts/choo-redirect#readme
- Issues: https://github.com/yoshuawuyts/choo-redirect/issues
- npm.io page: https://npm.io/package/choo-redirect

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2017-05-20
- 1.0.0 — 2016-12-13

## README

# choo-redirect [![stability][0]][1]
[![npm version][2]][3] [![build status][4]][5] [![test coverage][6]][7]
[![downloads][8]][9] [![js-standard-style][10]][11]

Redirect a view to another view.

## Usage
```js
var redirect = require('choo-redirect')
var html = require('choo/html')
var choo = require('choo')

var app = choo()

app.route('/', redirect('/welcome'))
app.route('/welcome', welcomeView)

app.mount('body')

function welcomeView () {
  return html`
    <body>
      <div>welcome!</div>
    </body>
  `
}
```

## API
### view = redirect(route, rootSelector?)
Create a new view that redirects to a `route`. Can take an optional second
argument for the root selector which is used as the entry point of the
application. Defaults to `document.body`.

## Installation
```sh
$ npm install choo-redirect
```

## License
[MIT](https://tldrlegal.com/license/mit-license)

[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square
[1]: https://nodejs.org/api/documentation.html#documentation_stability_index
[2]: https://img.shields.io/npm/v/choo-redirect.svg?style=flat-square
[3]: https://npmjs.org/package/choo-redirect
[4]: https://img.shields.io/travis/yoshuawuyts/choo-redirect/master.svg?style=flat-square
[5]: https://travis-ci.org/yoshuawuyts/choo-redirect
[6]: https://img.shields.io/codecov/c/github/yoshuawuyts/choo-redirect/master.svg?style=flat-square
[7]: https://codecov.io/github/yoshuawuyts/choo-redirect
[8]: http://img.shields.io/npm/dm/choo-redirect.svg?style=flat-square
[9]: https://npmjs.org/package/choo-redirect
[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[11]: https://github.com/feross/standard

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