@alixpay/react-native-mobile-sdk
v1.0.11
Published
[![npm version][npm-image]][npm-url]
Downloads
14
Readme
React Native Mobile SDK
Requirements
React Native v0.62.0+ is the minimum version supported.
Install
$ npm install @alixpay/react-native-mobile-sdk react-native-webview
or
$ yarn add @alixpay/react-native-mobile-sdk react-native-webview
Setup
import { SDKProvider } from '@alixpay/react-native-mobile-sdk'
function Component() {
return (
<SDKProvider>
<App />
</SDKProvider>
)
}
Usage
Example:
import { useSDK } from '@alixpay/react-native-mobile-sdk'
function Component() {
const { launchSDK } = useSDK()
return (
<View>
<Button
onPress={() => {
const queryParams = {
coin: '...',
theme: 'light',
env: 'Sandbox',
walletAddress: '...',
appToken: '...',
}
launchSDK(queryParams)
}}
/>
</View>
)
}
Query Params
| Key | Description | Default |
| -------------------------- |---------------------------|--------------|
| coin
| | None
| walletAddress
| | None
| appToken
| | None
| theme
| optional
| light
|
| env
| Sandbox
or Production
| Sandbox