Home > Enterprise >  Do I need additional set up when installing drawer navigator??? Reanimated2 warning. React Native
Do I need additional set up when installing drawer navigator??? Reanimated2 warning. React Native

Time:12-08

Can somebody clarify does drawer navigator requires additional set up apart from npm install react-native-gesture-handler react-native-reanimated? After installation of drawer and react-native-gesture-handler react-native-reanimated. Official doc on drawer does not require extra steps. However I am getting a warning "if you want to use reanimated 2 then go through your installation steps". Also my emulator is acting funny. Sometimes it works, sometimes is frozen, navigation is not working. Which I suspect it could be related to drawer and reanimated. Any clarification please?

CodePudding user response:

React Navigation related packages include @react-navigation/drawer, @react-navigation/stack, @react-navigation/bottom-tabs and @react-navigation/material-top-tabs use react-native-gesture-handler and react-native-reanimated for smooth gestures and animations.

React Navigation team does not directly define which versions of react-native-gesture-handler and react-native-reanimated to use due to all those packages being used in both React Native CLI and Expo CLI environments.

The developer is in charge to determine which version is suitable for the project.

Recently, Team at Software Mention and Shopify, collaborate on a new REACT NATIVE REANIMATED VERSION 2.

This new version brings a new simpler API and Turbo Modules infrastructure which is not yet completely deployed in React Native (specifically on Android).

When you're using React Navigation package, you can choose to upgrade to Reanimated V2 or keep with the old version. I expect the reason behind that warning.

Expect the emulator to slow when toggling the drawer, it's not a drawer problem. For smooth animations and gestures, I advise using a real Android device

  • Related