Setup
Typical usage involves wrapping your entire app with a <NotificationProvider>
:
import * as React from "react";import ReactDOM from "react-dom";import NotificationProvider from "react-notification-manager";import App from "./App"; ReactDOM;
Now you can use useNotificationManager
to create notifications.
import * as React from "react";import useNotificationManager from "react-notification-manager"; // Your own Dialog componentimport Dialog from "./your-app/dialog"; { const createNotification = ; return <button => Open Dialog </button> ;}