Toast Notifications
This will guide you through integration steps to show toast notifications when new notification arrives, in react application.
Toast Notifications in @suprsend/react
In the @suprsend/react
SDK, toast notification functionality is no longer included in Inbox by default. Developers who wish to use toast notifications will need to implement them separately to achieve similar functionality. This change allows for more flexibility and modularity in customizing the user experience.
SDK exposes event listener feed.new_notification
which is available on feedClient. You can use this listener to show toast notification by using your own toast library. We also export ToastNotification
component, which is a light version of NotificationCard
that can be used by your toast library. The following example snippet uses react-hot-toast.