Last active
September 13, 2017 16:52
-
-
Save dk0r/544e4a086ffaf01d52b378ad1d18131e to your computer and use it in GitHub Desktop.
undefined is not an object (evaluating 'this.props.event.location')
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Child from './Child' | |
let newEvent = { | |
location: { latitude: 42.816006, longitude: -73.911287}, | |
color: 'wheat' | |
} | |
export default class Parent extends React.Component { | |
render() { | |
//console.log('I am the Parent!!!') | |
//console.log(newEvent) | |
return ( | |
//<Child event={newEvent}/> | |
<Child testProp="IMAString"/> | |
) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class Child extends React.Component { | |
render() { | |
console.log('I am the Child!!!') | |
console.log(this.props) | |
return ( | |
// <MapView | |
// initialRegion={{ | |
// latitude: this.props.event.location.latitude, | |
// longitude: this.props.event.location.longitude, | |
// }} | |
// /> | |
<View> | |
<Text>..Just Some Text...</Text> | |
</View> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment