react-native-button
react-native-button copied to clipboard
when using The props or button loading will get a error , and other is work.
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undifined. Check the render method of 'Button'.
<Button isLoading={true} style={styles.buttonStyle7} textStyle={styles.textStyle6} onPress={() => { console.log('world!') }}> Hello </Button>
it can"t work.
<Button style={styles.buttonStyle6} textStyle={styles.textStyle} onPress={() => { console.log('world!') }}> Hello </Button>
it can work
Hello @feaverfei!
I need more info to debug, RN version, platform, button version, etc.
Checking the example, the isLoading
prop works perfectly.
thanks
{
"name": "Project",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start"
},
"dependencies": {
"react": "^15.1.0",
"react-native": "^0.27.2"
}
}
i think i should update this version
Hey is this issue solved because I am also facing the same issue "react": "^15.1.0", "react-native": "^0.27.2" is what am I also using!
<Button style={{backgroundColor: color, marginTop: 40.5, borderWidth: 0, borderRadius: 0}} textStyle={{fontSize: 15, color: 'white', fontFamily: 'Montserrat-Regular', letterSpacing: 0.3}} isLoading = { true } onPress={this.continuePressed.bind(this)} > CONTINUE </ Button>
gives error:
React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).%s"