@@ -103,7 +103,7 @@ Dispatch notification actions from any other component:
103103import React , {PropTypes } from ' react' ;
104104import ReactDOM from ' react-dom' ;
105105
106- import Notifications from ' react-notification-system-redux' ;
106+ import Notifications , { success } from ' react-notification-system-redux' ;
107107
108108const notificationOpts = {
109109 // uid: 'once-please', // you can specify your own uid if required
@@ -127,7 +127,7 @@ class OtherComponent extends React.Component {
127127
128128 handleClick () {
129129 this .context .store .dispatch (
130- Notifications . success (notificationOpts)
130+ success (notificationOpts)
131131 );
132132 }
133133
@@ -165,6 +165,18 @@ dispatch(Notifications.warning(notification));
165165dispatch (Notifications .info (notification));
166166dispatch (Notifications .hide (uid)); // Hides notification based on uid
167167dispatch (Notifications .removeAll ()); // Removes all notifications
168+
169+ // OR //
170+
171+ import { show , success , error , warning , info , hide , removeAll } from ' react-notification-system-redux' ;
172+
173+ dispatch (show (notification, level));
174+ dispatch (success (notification));
175+ dispatch (error (notification));
176+ dispatch (warning (notification));
177+ dispatch (info (notification));
178+ dispatch (hide (uid)); // Hides notification based on uid
179+ dispatch (removeAll ()); // Removes all notifications
168180```
169181
170182
0 commit comments