react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

useScreens() with react navigation freezes scrollView

Open jwhscholten opened this issue 7 years ago • 25 comments

In my basic Expo app I have a horizontal scrollview on my second tab screen, my tabs are all stackNavigators. Using a single component as tab view causes the same issue. Issue occurs on iOS and Android.

-Opening my 2nd tab for the first time, scrollView works fine. -Switch to first tab and back to 2nd tab freezes scrollView -Switch to 3rd or 4th tab and back to 2nd, scrollView behaves normally

Solution: Remove useScreens() in app.js

Using: Expo SDK 32 React Native Screens 1.0.0-alpha.19 React Navigation 3.0.9

jwhscholten avatar Feb 18 '19 08:02 jwhscholten

Same problem +1

leedan77 avatar Feb 18 '19 09:02 leedan77

It doesn't freeze, it's just that there is a View that catch all the touchable events in front of your app. You can see it with the inspector : capture d ecran 2019-02-18 a 16 55 14

I think that this issue appeared when I updated to Expo SDK 32

martinezguillaume avatar Feb 18 '19 15:02 martinezguillaume

I reported a similar issue here : https://github.com/kmagiera/react-native-screens/issues/79 , with a quick demo to reproduce. I think they are related.

ovy9086 avatar Mar 08 '19 14:03 ovy9086

can you post a reproducible example for the exact case you describe here @jwhscholten? want to ensure it's the same as what @ovy9086 mentioned

brentvatne avatar Mar 08 '19 19:03 brentvatne

@brentvatne I'll try a.s.a.p.

jwhscholten avatar Mar 14 '19 10:03 jwhscholten

any updates on this ?

ovy9086 avatar Mar 22 '19 15:03 ovy9086

I can confirm this issue. Removing useScreen fixed the problem for me. As soon as I switch tabs back and forth, it will stop from scrolling. I have to switch back again, scroll a bit on another screen, and switch to the broken tab and I can scroll again. Switching back will break it again.

hirbod avatar Apr 26 '19 08:04 hirbod

It seems like this is quite widespread. Running into this issue too, it showed up after upgrading to expo SDK32. Also getting a ScreenContainer on top that captures all touch events. Not sure if it's because I'm using tab navigator inside of tab navigator.

Is possible that this is related? https://github.com/kmagiera/react-native-screens/issues/61

jakejyang avatar Apr 27 '19 20:04 jakejyang

I encounter this issue too. My scrollview doesnt respond with useScreens() applied

OscarYuen avatar May 29 '19 12:05 OscarYuen

Hi there. Any updated on this issues?

midyan avatar Jun 27 '19 09:06 midyan

this issue basically renders the entire library unusable... will this ever be addressed ? Is this repo still maintained ?

ovy9086 avatar Jul 05 '19 08:07 ovy9086

this issue basically renders the entire library unusable... will this ever be addressed ? Is this repo still maintained ?

Yes. It's still maintained. I watched the author's talk recently. But I agree, until this issue is fixed, I can't really use this very good library in production. This is a big deal breaker.

Kasendwa avatar Jul 05 '19 08:07 Kasendwa

Yes. It's still maintained. I watched the author's talk recently. But I agree, until this issue is fixed, I can't really use this very good library in production. This is a big deal breaker.

what talk ? 😛 maybe we can benefit from looking at it as well . or you can break down a 'roadmap' / 'plan' for this library for us 😄

ovy9086 avatar Jul 05 '19 09:07 ovy9086

This severe bug only occurs on certain Androids https://github.com/facebook/react-native/issues/25755 but there is no response

aznoisib avatar Jul 30 '19 23:07 aznoisib

Logic I have to make the function of detecting a bad scroll

aznoisib avatar Jul 30 '19 23:07 aznoisib

I found this issue fixed in Expo SDK 33

OscarYuen avatar Aug 07 '19 15:08 OscarYuen

This bug on react native framework

aznoisib avatar Aug 08 '19 01:08 aznoisib

I'm still seing this bug on expo 34

chrisdengso avatar Sep 17 '19 10:09 chrisdengso

Can someone tell if the issue still exists in the newest version? @jwhscholten @CruelMoney ?

WoLewicki avatar Apr 02 '20 11:04 WoLewicki

This bug has been resolved long time ago @WoLewicki I can confirm it, since it was broken for me too (im one of the first comments)

hirbod avatar Apr 03 '20 16:04 hirbod