Transak Docs
Search…
βš›
React Native
You can integrate Transak into your React Native project using our React Native SDK.
The NPM page for the SDK can be found here: https://www.npmjs.com/package/@transak/web-view​
Install the SDK with the following command into your project with the following command:
yarn add @transak/web-view
Install the dependencies with the following command:
yarn add react-native-webview react-native-inappbrowser-reborn @react-native-community/netinfo
The TransakWebView can then be used as shown below
import TransakWebView from '@transak/web-view';
​
function TransakReactNativeIntegration() {
return (
<TransakWebView
config={{
apiKey: '<your-api-key>',
environment: '<environment: STAGING/PRODUCTION>',
}}
onTransakEventHandler={(event, data) => console.log(event, data)}
/>
);
};
Use the config param to use the various configuration options available in the Transak widget. Full list of options is available here.
The onTransakEventHandler attribute can be used to listen to events generated by Transak widget as listed here.
Last modified 2mo ago
Copy link