as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

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.