as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容

Add Navigation

Let’s add navigation to LandingScreen, so that we can load the VideoDetailsScreen when we click on a VideoCard.
  • In LandingScreen.tsx destructure navigation in the parameters for LandingScreen, declaring it to be of type any.
  • Update the VideoCard to take in the new prop pressFunction and set it to navigate to the VideoDetailScreen
  • Add { video: item } as a parameter to the navigate call.
The LandingScreen.tsx code should look like this:
Now if you click on a video it should take you to the VideoDetail Screen we created, however as you can see the Video Details are currently hardcoded so next we will update this screen to render the actual video data.
VideoDetail Screen

VideoDetail Screen


最后修改于 2026年2月9日