React Native

Assuming you have already integrated the Scrimmage Rewards Widget into your React Native application, you can listen to events emitted by the widget by adding a JavaScript interface to the WebView.

// ...

<WebView
  // ...
  onMessage={(event) => {
    const { type, payload } = JSON.parse(event.nativeEvent.data);
    switch (type) {
      case 'ready':
        // Widget is ready to be used.
        break;
      case 'redirect':
        const { redirect, parameters } = payload;
        // Handle redirect event.
        break;
    }
  }}
/>

Check out the Widget Events API for more information.