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

Element type is invalid #4

Open
sdrabb opened this issue Dec 30, 2016 · 1 comment
Open

Element type is invalid #4

sdrabb opened this issue Dec 30, 2016 · 1 comment

Comments

@sdrabb
Copy link

sdrabb commented Dec 30, 2016

i run that code:

 import React, { Component } from 'react'
 import ReactNative from 'react-native'
 const {
    View,
    Text,
 } = ReactNative

class AppContainer extends Component{

render(){
	return <View>
		<Text style={{marginTop: 20}}>
		I am app container
		</Text>
	</View>
            }

 } 


  export default AppContainer`

i got this error: ExceptionsManager.js:63 Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Check the render method of App.

how can i solve?

@jqn
Copy link

jqn commented Feb 17, 2017

@sdrabb did you resolve this problem? what does your render method for app look like?

I was getting the same error because I was missing if (this.props.scene.route.key === 'Detail') { Scene = Detail } from AppContainer.js but I think you haven't made it to that point in the tutorial if that's what you are following.

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

2 participants