In this guide, we'll walk through the process of integrating the SuprSend In-App Notification Center into your React applications. SuprSend offers a convenient SDK that allows you to seamlessly incorporate Inbox and Toast notifications into your web applications.
Ensure that you replace the placeholder values with your actual SuprSend credentials and subscriber information.
Interaction with React Components - Example
Once integrated, the SuprSend In-App Inbox will automatically handle the display of messages within your React application. You can interact with the Inbox component using various methods provided by the SuprSend SDK.
For example, you can trigger the display of a notification message when a certain event occurs in your application. This can be achieved by calling the appropriate SDK method within your React components.
import{SuprSendInbox}from'@suprsend/react-inbox';functionExample(){consthandleClick=()=>{// Trigger a notification messageSuprSendInbox.showNotification('New message received!');};return (<div><buttononClick={handleClick}>Show Notification</button><SuprSendInboxworkspaceKey='<workspace_key>'workspaceSecret='<workspace_secret>'subscriberId='<subscriber_id>'distinctId='<distinct_id>'/></div>);}
Interaction with Your Application
The SuprSend In-App Inbox seamlessly integrates with your React application, allowing you to deliver targeted messages and notifications to your users based on their interactions and behaviors within the application.
Contextual Messages: You can send contextual messages and announcements to users based on specific events or actions within your application.
User Engagement: The In-App Inbox enhances user engagement by providing a centralized location for users to access important messages and updates.
Personalization: You can personalize messages and notifications based on user attributes and preferences, ensuring relevant and meaningful communication.
Usage
Once integrated, the SuprSend In-App Notification Center will handle the display of inbox and toast notifications within your React application based on the configuration provided during integration.
Conclusion
Incorporating the SuprSend In-App Notification Center into your React application is a straightforward process. By following the steps outlined in this guide, you can enhance user engagement and communication by leveraging the power of inbox and toast notifications provided by SuprSend.
For more advanced usage and customization options, refer to the official documentation provided by SuprSend.
Happy coding!
Here is the Github react native repo for the same. Try headless to get your own custom native inbox:
After installing, Import the component in your code and use it as given below. Replace the variables with actual values.
importSuprSendInboxfrom'@suprsend/react-inbox'import'react-toastify/dist/ReactToastify.css'// needed for toast notifications, can be ignored if hideToast=true// add to your react component;<SuprSendInboxworkspaceKey='<workspace_key>'subscriberId='<subscriber_id>'distinctId='<distinct_id>'/>