Skip to main content

Setup

Step 1 Before setting up the SDK, please make sure you have followed the steps to setup the Raven In-App Integration first. Step 2 Run the following commands your project root directory.
Step 3 Inorder to start using InApp React SDK ,intialize library and import InAppNotificationCenter and styles.
  • Do not forget to call deintialize method when user logs out otherwise user will receive notifications event after logging out. You can access the deintialize method by importing countService.
  • When display style is ‘fullScreen’, there will not be bell icon. Inorder to access new notification’s count, import the countService and subscribe the count.
  • When display style is ‘fullScreen’, you can remove the header by passing header= to the InAppNotificationCenter component. In that case, you can access to the unread count, mark all read, reload data by importing countService.
    • deintialize - countService.deintialize()
    • mark all read - countService.markAllRead()
    • reload data - countService.reloadData()
    • update last seen - countService.updateLastSeen() (call this function when displayStyle is ‘fullScreen’ and header = to update the last seen)

In-App React Demo App

You can follow the below process to see the demo of In-App React SDK. Step 1 Clone this repo.
Step 2 Run this command in the root folder.
Step 3 Move to the example folder.
Step 4 Pass the userId, appId and signature values to the InAppNotificationCenter component in example/src/App.js. Step 5 Run the following command in the project root directory to start the app.