# redux-callback-router

> State-based routing using Redux

Latest version **0.1.1** (published 2019-09-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install redux-callback-router
pnpm add redux-callback-router
yarn add redux-callback-router
bun add redux-callback-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.1.1 |
| Published | 2019-09-08 |
| First published | 2019-09-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Keith McKnight |
| Maintainers | kmck |
| Keywords | callback, router, route, routing, history, redux, actions, state |

## Links

- npm: https://www.npmjs.com/package/redux-callback-router
- Repository: https://github.com/kmck/callback-router
- Homepage: https://github.com/kmck/callback-router/tree/master/packages/redux-callback-router
- Issues: https://github.com/kmck/callback-router/issues
- npm.io page: https://npm.io/package/redux-callback-router

## Dependencies (1)

- [callback-router](https://npm.io/package/callback-router.md) 0.1.1

## 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.1.1 (latest) — 2019-09-08
- 0.1.0 — 2019-09-08

## README

# Callback Router

Are you reluctantly adding routing to your web app? Say no more!

Most routers map a URL to some UI. **Callback Router** is a little different;
instead of mapping URLs directly to the components that render the page, this
library is a tiny hook into the history API that lets you map URLs to callback
functions that can do pretty much whatever you want!

Perhaps you need to maintain a meaningful URL for one reason or another, but you
don't want `window.location` totally running the show in your Single-Page App.
Using Callback Router allows you to keep the URL as far away from application
state as you like.


## Libraries

This whole thing exists because I didn't like having the full app state split
across the URL and the store when using React Router and Redux together.
In the interest of modularity, this repository is split up into four libraries,
so you can use the parts you need!

### [callback-router]

Core implementation that allows you to map routes to callbacks and integrate
with the browser history API.

### [react-use-callback-router]

React hook interface for Callback Router.

### [redux-callback-router]

This is the Redux flavor of Callback Router, which allows you to keep the URL
synchronized with your Redux state In addition to generic callbacks, you can map
routes to action creators so that navigation will dispatch an action.

### [react-use-redux-callback-router]

React hook interface for Redux Callback Router.


## License

ISC © [Keith McKnight](https://github.com/kmck)


[callback-router]: /packages/callback-router
[react-use-callback-router]: /packages/react-use-callback-router
[redux-callback-router]: /packages/redux-callback-router
[react-use-redux-callback-router]: /packages/react-use-redux-callback-router

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