2.1.6 • Published 12 months ago

reactjs-push-notification v2.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Reactjs Push Notifications

A solution for pushing browser web notification! reactjs-push-notification is an npm package that allows you to push notifications to the browser. It can be used with both Next.js and React.js. The package is easy to use and provides a variety of customization options.

Features

  • It is open source and licensed under the MIT license.
  • It is compatible with React.js 16.8+ and Next.js 9.5+.
  • It has been tested in Chrome, Firefox, and Safari.
  • It is well-documented and includes examples.

Installing

$ npm install reactjs-push-notification

Example

import { pushNotification, NotificationPrompt } from "reactjs-push-notification";

const Push = () => {
    const buttonClick = () => {
        pushNotification({
            title: "Warning",
            subtitle: "This is a subtitle!",
            message: "This is a long message!"
        });
    };
    return (
        <div className="page">
            <NotificationPrompt />
            <button onClick={buttonClick} className="button">
                Push Notifications
            </button>
        </div>
    );
};

export default Push;

Options

Stay in touch

2.1.6

12 months ago

2.1.5

12 months ago

2.0.5

12 months ago

2.0.0

12 months ago

1.0.0

12 months ago