jlebensold/peckish

Element type is invalid

Opened this issue · 1 comments

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 commented

@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.