1.1.0 • Published 6 years ago

react-route-params v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

react-route-params

Elegant, light and simple query param support for React

Why this is useful?

This simple utililty extracts away the headache of dealing with search or hash parameters on your application route and instead allows you to work with a simple object of key / value pairs.

  • Lightweight (less than 1kb)
  • No additional dependencies
  • Support for React and Vanilla JS / jQuery applications
  • Supports both search and hash parameters

Usage

// http://example.com/search?foo=bar&boo=baz
const params = require('react-route-params');
const query = params.get();
console.log(query);
/*
    {
        foo: 'bar',
        boo: 'baz
    }
*/

Installation

$ npm install --save react-route-params
# or
$ yarn install react-route-params

Run tests

$ npm test
# or
$ yarn test
1.1.0

6 years ago

1.0.0

6 years ago