Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when using The props or button loading will get a error , and other is work. #57

Open
feaverfei opened this issue Nov 18, 2016 · 4 comments

Comments

@feaverfei
Copy link

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

it can"t work.

<Button
style={styles.buttonStyle6} textStyle={styles.textStyle}
onPress={() => {
console.log('world!')
}}>
Hello

it can work

@alvaromb
Copy link
Collaborator

Hello @feaverfei!

I need more info to debug, RN version, platform, button version, etc.

Checking the example, the isLoading prop works perfectly.

@feaverfei
Copy link
Author

thanks

{
"name": "Project",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start"
},
"dependencies": {
"react": "^15.1.0",
"react-native": "^0.27.2"
}
}
image

@feaverfei
Copy link
Author

i think i should update this version

@Aadesh05
Copy link

Aadesh05 commented Apr 21, 2017

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants