@suprsend/react-inbox
Integrating SuprSend Inbox channel in React websites can be done in two ways:
- SuprSendInbox component which comes with UI and customizing props.
- SuprSendProvider headless component and hooks, incase you want to totally take control of UI. (example: Full page notifications).
Detailed documentation can be found here: https://docs.suprsend.com/docs/inbox-react
Installation
You can install SuprSend inbox SDK using npm/yarn
npm install @suprsend/react-inbox
SuprSendInbox Integration
After installing, Import the component in your code and use it as given below. Replace the variables with actual values.
import SuprSendInbox from '@suprsend/react-inbox'
import 'react-toastify/dist/ReactToastify.css' // needed for toast notifications, can be ignored if hideToast=true
// add to your react component;
<SuprSendInbox
workspaceKey='<workspace_key>'
subscriberId='<subscriber_id>'
distinctId='<distinct_id>'
/>
interface ISuprSendInbox {
workspaceKey: string
distinctId: string | null
subscriberId: string | null
tenantId?: string
stores?: IStore[]
pageSize?: number
pagination?: boolean
…