React-native-screens: Question: does it work out of the box with react-native-gesture-handler?

Created on 13 Sep 2018  路  6Comments  路  Source: software-mansion/react-native-screens

If I'm not mistaken, to make react-native-gesture-handler work with native navigation libraries (like wix's react-native-navigation), additional steps of setting it up are required. Does additional steps required if one uses react-native-screens with react-native-gesture-handler?

It would be great to have an answer to this question in README.

All 6 comments

hey @angly-cat that's a good point to mention how this library relates to react-native-navigation.

In short, it works just ok with react-native-navigation, that is you can use both ScreenContainer and Screens in RNN scenes. But most of the time this will not give you any benefits comparing to other "js only" navigation libraries. Since RNN uses native navigation components already (the approach is slightly different to what screens + react-navigation can do) the views that gets rendered in RNN scenes already get proper lifecycle management. One of a possible use cases where I see screens working along with RNN would be if you were to build screen pager component. Then you could render that inside RNN scene but pages lifecycle will then be controlled by ScreenContainer

Hope this answers your question.

PS:I'll keep this issue open to remind me to add that info to the README

Hi, @kmagiera. Thanks for answering. While it'll be great to have an overview how this library relates to RNN, my question actually was about your other library react-native-gesture-handler. I use RNGH extensively in my app, so I wonder if additional steps are required to integrate RNGH with this library or if they work alongside each other out of the box.

they will work with each other out of the box

Ok, thanks for answering, @brentvatne!

I just remembered @kmagiera wanting this issue to stay opened as a reminder. Sorry for closing it prematurely.

Updated the readme, thanks @angly-cat

Was this page helpful?
0 / 5 - 0 ratings