use-browser-notifications
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

use-browser-notifications

Made with create-react-library

NPM JavaScript Style Guide

Install

$ npm install --save use-browser-notifications

Or using Yarn with

$ yarn add use-browser-notifications

Usage

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

$ yarn

Then run the start script

$ yarn start

License

MIT © andreasonny83

Readme

Keywords

none

Package Sidebar

Install

npm i use-browser-notifications

Weekly Downloads

1

Version

0.3.2

License

MIT

Unpacked Size

107 kB

Total Files

8

Last publish

Collaborators

  • andreasonny83