Elegant, light and simple query param support for React
npm install react-route-paramsElegant, light and simple query param support for React
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
``javascript``
// 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
}
*/
$ npm install --save react-route-params
# or
$ yarn install react-route-params
$ npm test
# or
$ yarn test