An open API service indexing awesome lists of open source software.

https://github.com/frankdilo/use-query-string

Use query strings comfortably with React Hooks.
https://github.com/frankdilo/use-query-string

hooks query-string react

Last synced: 3 months ago
JSON representation

Use query strings comfortably with React Hooks.

Awesome Lists containing this project

README

        

# useQueryString

#### 🙋‍♂️ Made by [@frankdilo](https://twitter.com/frankdilo)

## Install

```
npm install use-query-string
yard add use-query-string
```

## Basic usage

```jsx
import useQueryString from "use-query-string";

const username = useQueryString("username");
```

## Transformers

Transformers allow you to modify the value you get from `useQueryString`. They are functions that receive the raw query string value and return a transformed version.

Here is an example:

```jsx
import useQueryString from "use-query-string";

const id = useQueryString("id", parseInt);
```