React Native
The Scrimmage Rewards Widget can be integrated into your React Native application using a WebView.
-
Import the
WebView
component:import { WebView } from 'react-native-webview';
-
Create a reference to the
WebView
component:const scrimmageWebView = useRef(null);
-
Add the
WebView
component to your view:<WebView ref={scrimmageWebView} source={{ uri: `${url}?token=${token}` }} style={{ flex: 1, backgroundColor: 'transparent', }} cacheMode="LOAD_NO_CACHE" onContentProcessDidTerminate={() => { webViewRef.current?.reload(); }} />
- Set
url
tohttps://<your org id>.apps.scrimmage.co
. - Set
token
to the user token. Check out the Getting Started page for more information. - All configuration options can be found here.
- Set
Updated 18 days ago