Register Plugin with Segment SDK
After adding all the required dependencies in SDK Installation, you need to add the MoEngage plugin with the Segment Client.
import { MoEngagePlugin } from "react-native-segment-plugin-moengage";
segmentClient.add({ plugin: new MoEngagePlugin() });
Initialize MoEngage SDK
Initialize the MoEngage Plugin in the App.js of your application by using the below API once the App Component is mounted.
import ReactMoE from 'react-native-moengage';
ReactMoE.initialize("YOUR Workspace ID");
Refer to the following for platform-specific initialization:
Sample Implementation
Refer to this GitHub repository for a sample implementation