Can somebody send a screenshot of the dependencies needed to run Drawer component in react native
Ps. it will help better if its a screenshot of packages.json
Thanks!
Can somebody send a screenshot of the dependencies needed to run Drawer component in react native
Ps. it will help better if its a screenshot of packages.json
Thanks!
Ill go step by step:
1.yarn add @react-navigation/native
2.yarn add react-native-screens react-native-safe-area-context
If you're on a Mac and developing for iOS, you need to install the pods (via Cocoapods) to complete the linking.
npx pod-install ios
react-native-screens package requires one additional configuration step to properly work on Android devices. Edit MainActivity.java file which is located inandroid/app/src/main/java/<your package name>/MainActivity.java.
Add the following code to the body of MainActivity class:
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null); } and make sure to add an import statement at the top of this file:
import android.os.Bundle
; This change is required to avoid crashes related to View state being not persisted consistently across Activity restarts.
Then
3.yarn add @react-navigation/drawer
4.yarn add react-native-gesture-handler react-native-reanimated
Final step: To finalize installation of react-native-gesture-handler, add the following at the top (make sure it's at the top and there's nothing else before it) of your entry file, such as index.js or App.js:
import 'react-native-gesture-handler';