npm.io
1.0.1 • Published 5 years ago

@feca-hooks/use-notification

Licence
MIT
Version
1.0.1
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
1

@feca-hooks/use-notification

React Hook to use browser notification easier.


How to Install

yarn

yarn add @feca-hooks/use-notification

npm

npm i @feca-hooks/use-notification


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 no
Return
Return value Type Description
sendNotification function If permission is granted, you can send notification using this function.

Keywords