colorfy-software / react-native-modalfy

🥞 Modal citizen of React Native.
https://colorfy-software.gitbook.io/react-native-modalfy
MIT License
1.16k stars 48 forks source link

RN 0.73: FlingGestureHandler must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. #134

Closed fendyk closed 8 months ago

fendyk commented 11 months ago

When using Modalfy (with RN 0.73 & Expo SDK 50) opening a modal will fail and throw this error:

ERROR  Error: FlingGestureHandler must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.
This error is located at:
    in FlingGestureHandler (created by StackItem)
    in RCTView (created by View)
    in View
    in Unknown (created by StackItem)
    in RCTView (created by View)
    in View
    in Unknown (created by StackItem)
    in StackItem
    in RCTView (created by View)
   etc..

I think it has something to do with react native gesture's handler latest version (currently using 2.14.0) while modalfy uses 1.9.0.

EDIT I solved it by wrapping my app with the <GestureHandlerRootView>

Example:

<GestureHandlerRootView style={{ flex: 1 }}>
  <App/>
</GestureHandlerRootView>
andrisole92 commented 9 months ago

Having same issue

CharlesMangwa commented 8 months ago

closing as the answer (as specified in the installation guide) was already provided.