shopify-react-native-performance-navigation-drawer is an extension library atop @shopify/react-native-performance-navigation with additional helper methods for @react-navigation/drawer library.
Installation
-
Add the JavaScript library dependency in the
package.jsonfile. -
Run the following command, which sets npm to use the pre-version 7 behavior for handling peer dependencies specifically for the current projecsts. This allows for more lenient package installation when dealing with potentially incompatible or outdated dependencies.
-
Add the Babel module resolver plugin to the
devDependenciessection in thepackage.jsonfile: -
Configure an alias for
@amazon-devices/shopify__react-native-performance*in thepluginsection of thebabel.config.jsfile. -
For projects using libraries (where represents specific components like
stackornative), include these libraries in both thedependenciesandoverridessections of your package.json file. It is strongly recommended to upgrade to , which introduces@amazon-devices/react-native-reanimatedsupport for enhanced performance and animations. -
Reinstall dependencies using
npm installcommand. -
Restart metro with reset cache option
npm start -- --reset-cache.
Examples
Profiling how long it takes to render the screens hosted inside the different tabs using the Drawer Navigator created viacreateProfiledDrawerNavigator function.
API reference
Check out the dedicated documentation for info about this library, API reference and more: Official react-native-performance-navigation-drawer documentationFunctions
Implementaiton details
- Render pass reports for navigating within the drawer navigator aren’t currently generated on Vega due to a known issue with focus management in react-navigation’s drawer navigator.

