Menu
Menu Sheet Overlay
Search
Search Sheet

Using In-App Notifications

    Using the notification system

    Your generated project comes with a system to notify users with messages that drop down from the header, and can be dismissed. To make your own, add the following code to the actions file of your component in the desired action.

    Example:

    import {addNotification} from 'progressive-web-sdk/dist/store/notifications/actions'
    
    dispatch(addNotification(
        'uniqueIdForTheNotification',
        'The notification message.',
        true // Whether to show or hide the 'Remove' button on the notification
    ))
    

    Along with addNotification, removeNotification(id) and removeAllNotifications actions are supported.