@mycv/f8-notification
v1.0.1
Published
Using the Notifications API
Downloads
9
Readme
@mycv/f8-notification
Using the Notifications API
Install
npm install --save @mycv/f8-notification
// or
yarn add @mycv/f8-notification
Usage
import React, { useEffect } from 'react';
import { initNotifications, notify } from '@mycv/f8-notification';
function Example() {
useEffect(() => {
// request after 3 seconds
initNotifications({ cooldown: 3000 });
}, []);
const showNotification = () => {
notify('Your title', { body: 'Your message.' });
}
return null;
}
License
MIT © sondn