Define the VideoDetailScreen
Before we can add the Navigation packages we need somewhere to Navigate to, so we need to create the Video Detail Screen. It will have a background image, video title, video description and eventually a play & back button.- Create a new file under the
screensfolder calledVideoDetailScreen.tsx. - Open the file and import React, and the necessary components from ‘react-native’. In this case we’ll need ImageBackground, Text, View, and StyleSheet.
- Create an arrow function called
VideoDetailScreenand export it. - Add a return statement to
VideoDetailScreenthat containsImageBackgroundtags, which will be the parent element. - Add a
sourceprop toImageBackgroundand hard code it to{uri: 'placeholder'}, - Add two Text elements inside
ImageBackground, one for title and one for description. Add the text, “Video Title”, to the first element, and “Video Description”, to the other.
Add Styling
Let’s add some styling.- Create a StyleSheet called
stylesand add it after theVideoDetailScreenarrow function. - Add
image,screenContainer,videoTitle,videoDescriptionstyles to the StyleSheet with the following values.
- Add the styles to their respective elements.
VideoDetailScreen.tsx code should look like:
Update Index File in Screens Folder
The last step is to add this screen to theindex.ts file in the screens folder.
- Open
index.tsin thescreensfolder. - Add VideoDetailScreen to the import and export statements.
index.ts file should look like this:

