React Notifier System
An extension of react-notification-system for showing notifications with much simpler approach.
Installing
npm install react-notifier-system
Important
For complete documentation, please go to react-notification-system.
Using
For optimal appearance, this component must be rendered on a top level HTML element in your application to avoid position conflicts.
const App = Component<{}> thisnotifier thisnotifier thisnotifier notifier: any { return <div> <Notifier ref= thisnotifier = notifier /> <button onClick=thisaddOrUpdateMyNotification>Add or update my notification</button> <button onClick=thisremoveMyNotification>Remove my notification</button> <button onClick=thisaddNotification>Add </button> </div> } ReactDOM;
Methods
showNotification(notification)
Add or update a notification object. This displays the notification based on the object you passed.
It updates the notification if save id
' found in current notification list, otherwise it adds this notification.
removeNotificationById(notificationId)
Remove the notification by id
.
Roadmap
- Redux implementation