React-native-gesture-handler: Evaluating Component.propTypes

Created on 20 Dec 2019  路  6Comments  路  Source: software-mansion/react-native-gesture-handler

Captura de Pantalla 2019-12-20 a la(s) 16 36 30

I am getting this error from upgrading from RN 0.59.10 to RN 0.61.5, I can't find the reason. Any clue?
Libs were unlinked and added to Pod

Gesture handlers

Most helpful comment

I had the same issue and to workaround I simply put:

import React, { Component } from 'react';

at the very top of ./node_modules/react-native-gesture-handler/GestureHandler.js

Be aware that this is a temporary solution and I hope the package is fixed soon.

All 6 comments

hi,
I have the same issue. I am stuck in this same case (after upgraded to 0.61.5). Does anyone have any workarounds?

hi,
I have the same issue. I am stuck in this same case (after upgraded to 0.61.5). Does anyone have any workarounds?

The workaround I found on jest test is to mock every react-navigation library (or the ones you are actually using in your project).

jest.mock('react-navigation-stack', () => ({
  createStackNavigator: () => { },
  propTypes: {}
}));

jest.mock('react-navigation-tabs', () => ({
  createMaterialTopTabNavigator: () => { },
  createBottomTabNavigator: () => { },
  propTypes: {}
}));
...

hi,
I don't use jest test, but I still have the same issue. Does you know another workarounds?
I already downgrade the react-native version to 0.61.0 from 0.61.5 and updated the react-native-gesture-handler and react-navigation to latest version, but nothing works.

I've found a solution, aparently. I faced it when tried to update from [email protected] to [email protected].
To solve it:

  • update react-native-gesture-handler to latest
$ npm update react-native-gesture-handler@latest
  • update react-navigation to latest
$ npm update react-navigation@latest

To update them just follow the docs


Hope to help 馃槃

I had the same issue and to workaround I simply put:

import React, { Component } from 'react';

at the very top of ./node_modules/react-native-gesture-handler/GestureHandler.js

Be aware that this is a temporary solution and I hope the package is fixed soon.

@99pdl you are my savior ! I was stuck with "react-native-gesture-handler" for 3 days.
Again, thank you so much <3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

enahum picture enahum  路  4Comments

alexthebake picture alexthebake  路  3Comments

chhornponleu picture chhornponleu  路  3Comments

jacobrosenskold picture jacobrosenskold  路  3Comments

neiker picture neiker  路  3Comments