# router-add-query

> React router with query params

Latest version **0.0.9** (published 2018-10-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install router-add-query
pnpm add router-add-query
yarn add router-add-query
bun add router-add-query
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2018-10-02 |
| First published | 2018-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lewis Dackam |
| Maintainers | 6ewis |
| Keywords | react-router, router, queryParams |

## Links

- npm: https://www.npmjs.com/package/router-add-query
- Repository: https://github.com/6ewis/router-add-query
- Homepage: https://github.com/6ewis/router-add-query#readme
- Issues: https://github.com/6ewis/router-add-query/issues
- npm.io page: https://npm.io/package/router-add-query

## Dependencies (4)

- [ramda](https://npm.io/package/ramda.md) ^0.25.0
- [idb-keyval](https://npm.io/package/idb-keyval.md) ^3.1.0
- [@babel/plugin-transform-react-jsx](https://npm.io/package/@babel/plugin-transform-react-jsx.md) ^7.0.0
- [@babel/plugin-proposal-object-rest-spread](https://npm.io/package/@babel/plugin-proposal-object-rest-spread.md) ^7.0.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.0.9 (latest) — 2018-10-02
- 0.0.8 — 2018-10-02
- 0.0.7 — 2018-10-02
- 0.0.6 — 2018-10-02
- 0.0.5 — 2018-10-02
- 0.0.4 — 2018-10-02
- 0.0.3 — 2018-10-02
- 0.0.2 — 2018-10-02
- 0.0.1 — 2018-10-02
- 1.0.0 — 2018-10-02

## README

# router-add-query 

[WIP]

[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)

This library will allow you to add query params to react router v4.0.0 and above. 

  -  Add an object to the location props of any component with the most recent queryParams of each page visited : 
  ```
  { 
    query: 
     { "/": {utm_source: "facebook"}, 
     { "signup/": {utm_campaign: "Dillinger", utm_source: "facebook"}} 
}
```
  - Lightweight
  - Use indexdb to store the state of the queryParams

### Tech

It uses a number of open source projects to work properly:

* [Ramda] - A practical functional library for JavaScript programmers.
* [idb-keyval] - A super-simple-small promise-based keyval store implemented with IndexedDB

And of course React-router-query-params itself is open source with a [MIT License][dill]
 on GitHub.

### Installation

```sh
$ yarn install react-router-query-params
```
### Usage
For production environments...

```sh
import { withRouterWithQuery } from 'react-router-query-params';

const App = () => <div> Example Component </div>
withRouterWithQuery(App);

// OR

<RouterWithQuery> <App/> <RouterWithQuery/>
```

### Development

Want to contribute? Great!

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