React-native-screens: Which libs are required by react-native-screens

Created on 27 Jul 2020  路  8Comments  路  Source: software-mansion/react-native-screens

I am using only and only native-stack navigator, and now I am confused which libraries are required by react-native-screens/native-stack ?? I am asking this because, in react-navigation there is multiple libs to be install like:

react-native-gesture-handler
react-native-safe-area-context
@react-native-community/masked-view

So do I need the above 4 packages for only react-native-screens/native-stack ?

All 8 comments

any help...

For native-stack, you should only need @react-navigation/native. You can read it at https://github.com/software-mansion/react-native-screens/tree/master/native-stack#native-stack-navigator. Does it solve your issue?

And reactnavigation.org says:

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';

So we do we have to only react-native-gesture-handler ?

It is not needed for native-stack, but if you want it, you have to add it after installing the package.

@WoLewicki thank you very much, could you please let me know when it is needed react-native-gesture-handler ?

And also please if you know let me know do we need react-native-reanimated ? for native-stack animation?

It is needed when you want to use it in your project. As I said, native-stack does not require react-native-gesture-handler and react-native-reanimated. Animations are native there. You can check it by making a simple project without those libraries installed.

Thank you bro very much

No problem. Have a good day 馃檪 I am closing it then, feel free to comment if you have any questions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bartzy picture bartzy  路  3Comments

pvinis picture pvinis  路  5Comments

beetlebum picture beetlebum  路  5Comments

chai86 picture chai86  路  3Comments

thomasgosse picture thomasgosse  路  4Comments