# react-search-query

> A lightweight library for working with search queries in react

Latest version **1.0.16** (published 2022-09-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-search-query
pnpm add react-search-query
yarn add react-search-query
bun add react-search-query
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.16 |
| Published | 2022-09-23 |
| First published | 2022-09-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jamiuibikunle |
| Keywords | query, query parameter, url search, search, url |

## Links

- npm: https://www.npmjs.com/package/react-search-query
- npm.io page: https://npm.io/package/react-search-query

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.0.16 (latest) — 2022-09-23
- 1.0.15 — 2022-09-23
- 1.0.14 — 2022-09-23
- 1.0.4 — 2022-09-23
- 1.0.13 — 2022-09-23
- 1.0.12 — 2022-09-23
- 1.0.11 — 2022-09-23
- 1.0.1 — 2022-09-23
- 1.0.0 — 2022-09-23

## README

# React Search Query

A lightweight library for working with search queries in react

React search query allows you to get the search params in the URL with a single line of code.

## Installation

React-search-query requires a window to run. If you're using a Next application, wrap the method in useEffect.

```sh
yarn add react-search-query
yarn start

npm install react-search query
npm start
```

## Usage

To use react-search-query in a react application, import the package and initialise:

```sh
import { Query } from "react-search-query"

const App = () => {
    const query = Query()
    console.log(query)
}
```

To use react-search-query in a next application, import the package and intiailise in useEffect:

```sh
import { Query } from "react-search-query"
import { useState, useEffect } from "react"

const App = () => {
    const [state, setState] = useState({})

    useEffect(() => {
        const query = Query()
        setState(query)
    }, [])

    console.log(state)
}
```

## Repository

Check out the public repository [here](https://github.com/thealphameil/react-search-query)

---
_Source: https://npm.io/package/react-search-query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
