evenchange4 / react-grecaptcha

React.js Google reCAPTCHA v2 integration component.
https://react-grecaptcha.netlify.com
MIT License
51 stars 8 forks source link

view config not found for name div #124

Open danishsharma1993 opened 4 years ago

danishsharma1993 commented 4 years ago

I am using this library but getting the below issue:

view config not found for name div

My source code:

import React, { Component } from 'react'
import { View, StyleSheet, Text } from 'react-native'
import Recaptcha from 'react-grecaptcha';

export default class Captcha extends Component {

    recaptchaLoaded=()=>{
        console.log("Capctcha","loaded")
    }

    expiredCallBack = () => {
        console.log("Capctcha", "expiredCallBack")
    }

    render() {
        return (
            <View style={styles.container}>
                <Text>Hiii</Text>

                <Recaptcha
                    sitekey={'MyKey'}
                    callback={this.recaptchaLoaded}
                    expiredCallback={this.expiredCallBack}

                />

            </View>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1
    }
})