NadiKuts / react-native-pull-refresh

Custom pull to refresh component for Android
https://expo.io/@devilsanek/animated-pull-to-refresh
563 stars 127 forks source link

undefined is not an object (evaluating '_react.default.PropTypes.bool') #34

Open akaytatsu opened 4 years ago

akaytatsu commented 4 years ago

image

carl0804 commented 4 years ago

Same issue

  "dependencies": {
    "lottie-ios": "3.1.3",
    "lottie-react-native": "^3.3.1",
    "react": "16.9.0",
    "react-native": "0.61.4",
    "react-native-pull-refresh": "^1.0.0",
    "react-native-reanimated": "^1.4.0"
  },
carl0804 commented 4 years ago

Same issue

  "dependencies": {
    "lottie-ios": "3.1.3",
    "lottie-react-native": "^3.3.1",
    "react": "16.9.0",
    "react-native": "0.61.4",
    "react-native-pull-refresh": "^1.0.0",
    "react-native-reanimated": "^1.4.0"
  },

Solved, import PropTypes from 'prop-types' in AnimatedPullToRefresh.js

ethanyuwang commented 4 years ago

can someone make a pull request?

brextonpham commented 4 years ago

same issue

elliet1 commented 4 years ago

I add import PropTypes from 'prop-types' in AnimatedPullToRefresh.js but still reporting the wrong undefined is not an object

FellowshipOfThePing commented 4 years ago

In case anyone is still struggling with this issue - On top of adding the new import statement to AnimatedPullToRefresh.js:

'import PropTypes from 'prop-types' in AnimatedPullToRefresh.js'

You also need to go through and replace all instances of 'React.PropTypes' with just 'PropTypes'

EDIT: It seems this issue has actually already been taken care of in the repo, just hasn't been updated in the npm package yet...