# @feca-hooks/use-notification

> React Hook to use browser notification easier.

Latest version **1.0.1** (published 2021-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @feca-hooks/use-notification
pnpm add @feca-hooks/use-notification
yarn add @feca-hooks/use-notification
bun add @feca-hooks/use-notification
```

## 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.1 |
| Published | 2021-02-26 |
| First published | 2021-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | pshtony1 |
| Maintainers | pshtony1 |
| Keywords | react, hooks, hook, browser, notification |

## Links

- npm: https://www.npmjs.com/package/@feca-hooks/use-notification
- Repository: https://github.com/pshtony1/custom-hooks
- Homepage: https://github.com/pshtony1/custom-hooks#readme
- Issues: https://github.com/pshtony1/custom-hooks/issues
- npm.io page: https://npm.io/package/@feca-hooks/use-notification

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2021-02-26
- 1.0.0 — 2021-02-26

## README

# @feca-hooks/use-notification

React Hook to **use browser notification easier.**

<br />

## How to Install

#### yarn

`yarn add @feca-hooks/use-notification`

#### npm

`npm i @feca-hooks/use-notification`

<br />

## Usage

### Code

```
import React from "react";
import useNotification from "@feca-hooks/use-notification";

function App() {
  const sendNotification = useNotification("Hello!");

  return <button onClick={sendNotification}>Send Hello</button>;
}
```

### Arguments

| **Argument** | **Type** | **Description**                                                                         | **Required** |
| ------------ | -------- | --------------------------------------------------------------------------------------- | ------------ |
| title        | string   | The text you want to notice.                                                            | yes          |
| options      | object   | [Reference](https://developer.mozilla.org/en-US/docs/Web/API/Notification/Notification) | no           |

### Return

| **Return value** | **Type** | **Description**                                                          |
| ---------------- | -------- | ------------------------------------------------------------------------ |
| sendNotification | function | If permission is granted, you can send notification using this function. |

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