Show notifications programmatically from your React components.
npm install react-notification-managerTypical usage involves wrapping your entire app with a :
``jsx
import * as React from "react";
import ReactDOM from "react-dom";
import { NotificationProvider } from "react-notification-manager";
import App from "./App";
ReactDOM.render(
document.getElementById("root")
);
`
Now you can use useNotificationManager to create notifications.
`jsx
import * as React from "react";
import { useNotificationManager } from "react-notification-manager";
// Your own Dialog component
import Dialog from "./your-app/dialog";
function App() {
const { createNotification } = useNotificationManager();
return (
onClick={createNotification(({ close }) => (
))}>
Open Dialog
);
}
``