Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-native-captcha

huangjinfei55ISC1.0.1

a plugin of yidun-captcha on react-native

react-native-captcha

readme

import React, {Component} from 'react'; import { View, Button } from 'react-native';

import {validate} from 'react-native-captcha'

const instructions = Platform.select({ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for dev menu', });

type Props = {}; export default class App extends Component<Props> { render() { return ( <View style={styles.container}> <Button title={'点击'} onPress={() => { validate("xxx码", (s) => { /**

         * s返回值格式
         * {
                     *  result:true/false
                     *  message:'返回提示语'
                     *  validate:返回的验证码
                     * }
         * */
                    alert(s.validate)
                });
            }}/>
        </View>
    );
}

}