# use-browser-notifications

> React Hook for Browser Notifications

Latest version **0.3.2** (published 2020-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-browser-notifications
pnpm add use-browser-notifications
yarn add use-browser-notifications
bun add use-browser-notifications
```

## 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.3.2 |
| Published | 2020-06-06 |
| First published | 2020-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 104.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | andreasonny83 |
| Maintainers | andreasonny83 |

## Links

- npm: https://www.npmjs.com/package/use-browser-notifications
- Repository: https://github.com/andreasonny83/use-browser-notifications
- Homepage: https://github.com/andreasonny83/use-browser-notifications#readme
- Issues: https://github.com/andreasonny83/use-browser-notifications/issues
- npm.io page: https://npm.io/package/use-browser-notifications

## Recent versions

- 0.3.2 (latest) — 2020-06-06
- 0.3.1 — 2020-06-06
- 0.3.0 — 2020-05-24
- 0.2.2 — 2020-05-24
- 0.2.1 — 2020-05-24
- 0.2.0 — 2020-05-24
- 0.1.1 — 2020-05-24
- 0.1.0 — 2020-05-24

## README

# use-browser-notifications

> Made with create-react-library

[![NPM](https://img.shields.io/npm/v/use-browser-notifications.svg)](https://www.npmjs.com/package/use-browser-notifications) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```sh
$ npm install --save use-browser-notifications
```

Or using Yarn with

```sh
$ yarn add use-browser-notifications
```

## Usage

```tsx
import React from 'react'

import { useBrowserNotifications } from 'use-browser-notifications';

function App() {
  const { show } = useBrowserNotifications({
    title: 'test notification',
    body: 'Hello world!',
  });

  return (
    <div className="App">
      <header className="App-header">
        <p>
          Use Browser Notifications
        </p>

        <div className="buttons">
          <button className="button" onClick={show}>Show Notification</button>
        </div>
      </header>
    </div>
  );
}

export default App;
```

## Local development

First install all the node dependencies using Yarn

```sh
$ yarn
```

Then run the `start` script

```sh
$ yarn start
```

## License

MIT © [andreasonny83](https://github.com/andreasonny83)

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