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.

