React Native Library
Install SDK in React Native Environment
1. IMQA Settings by Component
Setting up Functional Components
// MpmAgent import
import MpmAgent from ‘imqa-react-native-agent’;
..
const MyComponent = () => {
..
useLayoutEffect(() => {
// These settings must be applied in useLayoutEffect Hook
// as they are functions that should be called before the screen is rendered.
MpmAgent?.setBehaviorData("MyComponent");
}, []);
useEffect(() => {
// It should be located at the top of the useEffect function.
MpmAgent?.startReactNativeRender("MyComponent",true);
..
// It should be located at the bottom of the useEffect function.
MpmAgent?.endReactNativeRender("MyComponent",true);
}, []);
..
} Setting up Class Components
2. Setting up Network Communication
Using Axios for Network Communication
Using Fetch for Network Communication
Last updated