Initialize React-Native Component
Initialize the MoEngage Plugin in the App.js or App*.***ts of your application once the component is mounted.If you have a class-based component then you can initialize in the render() or componentDidMount()
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import ReactMoE from 'react-native-moengage';
ReactMoE.initialize("YOUR_Workspace_ID");
import ReactMoE from 'react-native-moengage';
useEffect(() => {
ReactMoE.initialize("YOUR_Workspace_ID");
}, []);
import ReactMoE from 'react-native-moengage';
import { MoEInitConfig, MoEPushConfig, MoEngageLogConfig, MoEngageLogLevel } from "react-native-moengage";
const moEInitConfig = new MoEInitConfig(
MoEPushConfig.defaultConfig(),
new MoEngageLogConfig(MoEngageLogLevel.DEBUG, isEnabledForReleaseBuild)
);
ReactMoE.initialize(YOUR Workspace ID, moEInitConfig);
Was this page helpful?