While email or SMS notifications only require the back-end part, you need our front-end SDK to display in-app notifications:
The example below creates the NotificationAPI widget in your front-end. The widget is placed in the container div specified by ID. The widget automatically connects to our servers and pull all the in-app notifications for the test user.
Create the following
React's state management and re-rendering would usually cause our widget to be destroyed and re-initialized with every state change. So, we have "memo"-ized the component to prevent re-rendering.
Now use the component anywhere you wish, for example, in