Passing Navigation props to screen : Part 14

Open ViewVideo.js file and get props video id . so our code should be to get value


so add

const videoId = this.props.navigation.state.params.vidid;

Now we can call { vidid } and use to display videoid which is clicked on VideoList page. So to check it

Now in return we will call vidid in Text

So change Text like this


Now refresh simulator and click on button of any video you will see that video id on that page

Now import WebView from react-native

WebView use to embed any url on page . It is same like we use iframe in normal html code. So we will use youtube embed url to embed video here using this component

Now in return add this code

  		source={{ uri: '' + videoId }}


© Copyrights 2014 by STW Services LLP