David Gauch
Jul 29, 2017 · 1 min read

Thanks for the tutorial, everything is working for me except for passing my data objects from the first component to the new component.

When I try to pass the data like you did into my new component:

render(){
const { title, description, pubdate, link } = this.props.navigation.state.params;

It says the properties are undefined.

Yet when I console.log(this.props.navigation.state.params) I can see all of these properties listed (title, description, pubdate, link) .

How can I access this data to use in my return like so?

return (
<View style={styles.container}>
<Text>{title}</Text>
<Text>{pubdate}</Text>
<Text>{description}</Text>
</View>
);

    David Gauch

    Written by