# rrrouter

> React based router - simple, yet powerful router for React

Latest version **1.1.12** (published 2017-04-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install rrrouter
pnpm add rrrouter
yarn add rrrouter
bun add rrrouter
```

## 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 | 1.1.12 |
| Published | 2017-04-22 |
| First published | 2016-12-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andrey Gayvoronsky |
| Maintainers | plandem |
| Keywords | react, router, routing, history, navigation, simple, powerful |

## Links

- npm: https://www.npmjs.com/package/rrrouter
- Repository: https://github.com/plandem/rrrouter
- Homepage: https://github.com/plandem/rrrouter#readme
- Issues: https://github.com/plandem/rrrouter/issues
- npm.io page: https://npm.io/package/rrrouter

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) 4.x
- [invariant](https://npm.io/package/invariant.md) 2.x
- [path-to-regexp](https://npm.io/package/path-to-regexp.md) 1.7.x

## 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

- 1.1.12 (latest) — 2017-04-22
- 1.1.11 — 2017-04-17
- 1.1.10 — 2017-04-15
- 1.1.9 — 2017-04-12
- 1.1.8 — 2017-04-12
- 1.1.7 — 2017-04-11
- 1.1.6 — 2017-04-11
- 1.1.5 — 2017-02-10
- 1.1.4 — 2017-02-02
- 1.1.3 — 2017-01-26
- 1.1.2 — 2017-01-17
- 1.1.1 — 2017-01-13
- 1.1.0 — 2017-01-12
- 1.0.12 — 2017-01-11
- 1.0.11 — 2017-01-11
- … 6 more at https://npm.io/package/rrrouter/versions

## README

#What?! Another router for React?!
Let's start with React - from official documentation:

>**What is React?**
>
>React is a declarative, efficient, and flexible JavaScript library for building user interfaces.

>**Composition**
>
>The key feature of React is composition of components. Components written by different people should work well together. It is important to us that you can add functionality to a component without causing rippling changes throughout the codebase.

>**Common Abstraction**
>
>We don't want to bloat your apps with useless library code.

>**Stability**
>
>We value API stability.

#So why?
It's true that there are already dozen routers for React. It's sad, but there is no any implementation that respects **React way**: non-bloated, easy to extend, simple yet powerful, stable api.

To learn rrrouter you must know only 3 things:
- Provider
- Router
- Route

_But let's start from beginning..._

#Architecture
![Architecture](http://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/plandem/rrrouter/master/docs/architecture.puml)

As you can see:
- There can be only one Provider with many Routers
- Each Router can have multiply Routes

But let's describe purpose of each component.

| Component      | Description              |
|----------------|--------------------------|
| Provider       | Provides current route information and actions to mutate it. Will notify each Router about changes of current route. Only Routers work directly with Provider. |
| Router         | Groups **Routes**, provides methods for matching/testing hrefs, exposes current route and actions from Provider. Will notify each Route(if condition met) about changes. Any component that wants to get information about current route or mutate it, must use Router for it. |
| Route          | Renders a component or invokes a callback if condition met. |

#TODO:
- documentation
- examples
- tests

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