React Navigation

What you will learn

  • Passing datas though Screens

👾 Before we start the exercise

👨‍🚀 Exercise 2

Go to src/Screen/StarshipFeedScreen.tsx:

  • The header title for this view should be Starships
  • Implement handlePress function to send the user to the STARSHIP_DETAIL_SCREEN, passing the starshipId as a parameter.

Go and create src/Screens/StarshipDetailScreen.tsx:

  • Set the header title for this view should be the name of the Starship
  • Implement a handlePilotPress function to send the user to the PILOT_PROFILE screen, passing the parameters below:
interface ProfileScreenProps {
  starshipId: number;
  pilots: [];
}

👽 Bonus

  • Create an <Avatar /> component with a custom picture for pilots. Just download images form the web and import them your the ./assets/ folder.