# use-clear-params

> React hook to clear search parameters from the url

Latest version **0.1.0** (published 2021-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-clear-params
pnpm add use-clear-params
yarn add use-clear-params
bun add use-clear-params
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-09-21 |
| First published | 2021-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 12.0.0 |
| Dependencies | 0 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Omer Yalhi |
| Maintainers | oyalhi |

## Links

- npm: https://www.npmjs.com/package/use-clear-params
- Repository: https://github.com/oyalhi/use-clear-params
- Homepage: https://github.com/oyalhi/use-clear-params#readme
- Issues: https://github.com/oyalhi/use-clear-params/issues
- npm.io page: https://npm.io/package/use-clear-params

## Recent versions

- 0.1.0 (latest) — 2021-09-21

## README

# useClearParams

React hook to to return and clear the url parameters

## Features

- clears parameters from the url
- returns url parameters as a URLSearchParam object

## Install

```bash
yarn add use-clear-params
# or
npm i use-clear-params --save
```

## Demos

```tsx
import useClearParams from "use-clear-params";

function App() {
  const query = useClearParams();

  // assuming the url is something like:
  // https://www.your-site/?username=jdoe&email=jane@gmail.com
  console.log(query.get("username")); // jdoe
  console.log(query.get("email")); // jane@gmail.com

  return (
    <div className="App">
      <h1>App</h1>
    </div>
  );
}

```

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