react-native-actions-sheet icon indicating copy to clipboard operation
react-native-actions-sheet copied to clipboard

[Only in iOS] Navigating to new screen leads to a frozen screen

Open shobhitsinghal624 opened this issue 2 years ago • 4 comments

Note: This issue occurs only in iOS. In android it works fine.

If I navigate to a new screen immediately after calling actionSheetRef.current?.hide() the new screen is frozen. If I navigate after a timeout more than 500ms, the new screen works fine.

I'm using the latest master version, since 0.8.4 wasn't showing the action-sheet in iOS.

Video for reference:

https://user-images.githubusercontent.com/4579093/188850577-c55b2f61-cfdd-4997-b9cb-aa30464cc3b0.mov

shobhitsinghal624 avatar Sep 07 '22 10:09 shobhitsinghal624

@ammarahm-ed Were you able to check this out? I can work on a PR if you can point me in the right direction.

shobhitsinghal624 avatar Sep 13 '22 03:09 shobhitsinghal624

You forgot to await the hide function, that might fix your error.

focux avatar Sep 15 '22 13:09 focux

@focux The hide function exposed by the ref is not async. The one exposed by the SheetManager is async. Using await is not helping here. The problem still persists.

shobhitsinghal624 avatar Sep 16 '22 08:09 shobhitsinghal624

@shobhitsinghal624 I would recommend moving to the sheet manager pattern to register sheets under a provider. It's much nicer and you won't have any async/await ref issues