@feca-hooks/use-notification

1.0.1 • Public • Published

@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.

Package Sidebar

Install

npm i @feca-hooks/use-notification

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

2.49 kB

Total Files

4

Last publish

Collaborators

  • pshtony1