samedi 19 août 2017

How do I use checkbox from icheck plugin?

My code is :

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

class User extends Component {
    render() {
        return (
            <View>
                <Checkbox
                    checkboxClass="icheckbox_square-blue"
                    increaseArea="20%"
                    label="Do you want to receive notification ?"
                />
            </View>)
    }
}
export default User;

Error : Expected a component class, got[object Object]. I don't know why I am getting error for Checkbox Component.

version :

"icheck": "^1.0.2",
"react": "16.0.0-alpha.12",
"react-icheck": "^0.3.8",
"react-native": "0.47.1",

Can anyone say where I am doing wrong ?




Aucun commentaire:

Enregistrer un commentaire