Install via Yarn: yarn add @onmeta/react-native-sdk
Install via npm: npm install @onmeta/react-native-sdk
npm install @pusher/pusher-websocket-react-native@^1.2.2
import MetaWidget from "@onmeta/react-native-sdk";
const eventHandler = async (event, data) => {
switch (event) {
// example to open the upi apps
case "upi-intent": {
const Linkdata = await JSON.parse(data);
void Linking.openURL(Linkdata.link);
}
default: {
// Default code
}
}
};
<MetaWidget
queryParams={{
apiKey: "*****MERCHANT_API_KEY********",
environment: "STAGING/PRODUCTION",
}}
onEventHandler={eventHandler}
/>;