in the root reducer import { bizlyStatusReducer } from 'bizly-status-notifications' and then add new store bizlyStatus: bizlyStatusReducer
in the main layout add the <StatusBanner /> component (it will be hidden until one of the actions trigger it). import StatusBanner from 'bizly-status-notifications'
in your app actions now you can import { pendingStatusNotification, successStatusNotification, failStatusNotification } from 'bizly-status-notifications' and then call dispatch(pendingStatusNotification()) or any other actions when needed.
Options
dispatch(pendingStatusNotification()) has no options, it should be dispatched for pending status
dispatch(successStatusNotification()) accepts either array of strings or just a string, default message is Your changes have been saved
dispatch(failStatusNotification()) accepts either array of strings or just a string, default message is Error sending data of strings or just a string, default message is Error sending data