react-nativereact-native-gesture-handler

React Native: react-native-gesture-handler: seems like using an old api after yarn


I reinstalled all my node_modules in my react-native project using yarn (Delete node_modules and run yarn). After it finished I've started my app and there heappens to pop up this warning:

[react-native-gesture-handler] Seems like you're using an old API with gesture components, check out new Gestures system!

And then it lists a lot of react-native elements (I think) like this:

PanGestureHandler@http://IP/index.bundle?platform=android&dev=true&minify=false&app=com.legosocialmedia&modulesOnly=false&runModule=true:133321:38
PanGestureHandler@http://IP/index.bundle?platform=android&dev=true&minify=false&app=com.legosocialmedia&modulesOnly=false&runModule=true:132628:34
RCTView
View
AnimatedComponent@http://IP/index.bundle?platform=android&dev=true&minify=false&app=com.legosocialmedia&modulesOnly=false&runModule=true:68721:38
AnimatedComponentWrapper
RCTView
View
Card@http://IP/index.bundle?platform=android&dev=true&minify=false&app=com.legosocialmedia&modulesOnly=false&runModule=true:131894:36
CardContainer@http://IP/index.bundle?platform=android&dev=true&minify=false&app=com.legosocialmedia&modulesOnly=false&runModule=true:131451:34
RNSScreen

And so on....

I tried reinstalling react-native-gesture-handler (yarn romove react-native-gesture-handler and yarn add react-native-gesture-handler), but that didn't change anything.


Solution

  • The new version, of react-native-gesture-handler send warning if you use an old API version, but also if one of your package/library use it.

    To disable the warning, you can ignore logs.

    in your app.js / app.tsx

    import { LogBox } from 'react-native';
    
    LogBox.ignoreLogs([
      "[react-native-gesture-handler] Seems like you\'re using an old API with gesture components, check out new Gestures system!",
    ]);
    

    Here you have the explanation

    UPDATE

    This is now fix since : react-native-gesture-handler": "2.1.1"