Installation
-
Add dependencies in the
package.jsonfile. You might not need all of the following packages, so include a subset of packages you need in your application. -
Add the
@amazon-devices/react-native-screensdependency for unmounting screens that aren’t visible. -
Reinstall the dependencies file using the
npm installcommand.
Examples
Stack example
Add the following dependencies:App.tsx file:
Native stack example
Add the following dependencies:App.tsx file:
Bottom tabs example
Add the following dependencies:App.tsx file:
Material bottom tabs example
Add the following dependencies:App.tsx file:
Material top tabs example
Add the following dependencies:App.tsx file:
Drawer example
Add the following dependencies:babel.config.js:
App.tsx file:
API reference
React-Navigation library on Vega adds support for all available APIs in the React-Navigation v6.Navigators
Components
Known issues and limitations
The Flipper pluginflipper-plugin-react-navigation is not supported on Vega.
Material bottom tabs
A component on the second screen is unmounted after navigating back and forth.Safe area of context
Referenced packages use the@amazon-devices/keplerscript-react-native-safe-area-context library for updated types. Do not directly consume this library.
Supported versions
react-navigation version 2.0.0
Vega previously released an older version of the react-navigation library for Vega OS calledreact-navigation version 2.0.0:
"@amazon-devices/react-navigation__bottom-tabs": "~2.0.0""@amazon-devices/react-navigation__core": "~2.0.0""@amazon-devices/react-navigation__devtools": "~2.0.0""@amazon-devices/react-navigation__drawer": "~2.0.0""@amazon-devices/react-navigation__elements": "~2.0.0""@amazon-devices/react-navigation__material-bottom-tabs": "~2.0.0""@amazon-devices/react-navigation__material-top-tabs": "~2.0.0""@amazon-devices/react-navigation__native": "~2.0.0""@amazon-devices/react-navigation__native-stack": "~2.0.0""@amazon-devices/react-navigation__react-native-tab-view": "~2.0.0""@amazon-devices/react-navigation__routers": "~2.0.0""@amazon-devices/react-navigation__stack": "~2.0.0"
react-navigation version 2.0.0 is not currently accessible for new developers.

