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.
- Host: GitHub
- URL: https://github.com/frankdilo/use-query-string
- Owner: frankdilo
- License: mit
- Created: 2020-02-02T16:41:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-02T16:55:55.000Z (over 5 years ago)
- Last Synced: 2025-02-09T15:41:39.359Z (5 months ago)
- Topics: hooks, query-string, react
- Language: TypeScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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);
```