as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

Add Navigation Packages

Now that we've created the Video Detail Screen, lets import the Vega supported React Navigation package and its dependencies. As the packages are not yet public, we will have to manually add them to our package.json and then install them using npm. You can find more details on how to use the React Navigation package here.

  • Open package.json from the root folder of your project.
  • Go to the dependencies section and add add a comma at the end of the last entry.
  • Start a new line and paste the following list of packages:

Copied to clipboard.

"@amazon-devices/react-navigation__core": "~2.0.0",
"@amazon-devices/react-navigation__devtools": "~2.0.0",
"@amazon-devices/react-navigation__native": "~2.0.0",
"@amazon-devices/react-navigation__routers": "~2.0.0",
"@amazon-devices/react-navigation__stack": "~2.0.0",
"@amazon-devices/react-native-screens": "~2.0.0",

Now let's install the packages and rebuild the app.

  • Go to a separate terminal window, go to your project folder, and run npm install to install the new packages.
  • After the packages install, re-run the steps to build and run your app.

The React Navigation package is now available to use in the app.