0.1.11 • Published 3 years ago

use-params-query v0.1.11

Weekly downloads
172
License
ISC
Repository
github
Last release
3 years ago

USE-PARAMS-QUERY

React hook to get the all query params from the url or to get the value of a particular key.

Installation:

npm i use-params-query -s

Basic Usage:

import useQueryParams, { useQueryParam } from "use-params-query";

const params = useQueryParams();
const param = useQueryParam("name");

Example:

for the below url the results will be as follows.

http://localhost:3000?name=Sam&age=20

const params = useQueryParams();
the result will be:  [{name: 'Sam'}, {age: 20}]

const param = useQueryParam("name");
the result will be:  Sam
0.1.10

3 years ago

0.1.11

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago