react-native-pull-to-refresh icon indicating copy to clipboard operation
react-native-pull-to-refresh copied to clipboard

Cannot read property 'number' of undefined

Open natterstefan opened this issue 8 years ago • 3 comments

Hi,

I get the following errors (in Android), after installing your package with npm i react-native-pull-to-refresh --save:

I got this one when onRefresh just logs something with console.log image

And this one with a promise image

I use it like described in the README:

   import PTRView from 'react-native-pull-to-refresh'

  refresh () {
    return new Promise((resolve) => {
      setTimeout(() => { resolve() }, 2000)
    })
  }

    <PTRView onRefresh={this.refresh} >
      (...)
   </PTRView>

natterstefan avatar Dec 15 '17 09:12 natterstefan

I have same error!

nguyenthithao avatar Dec 15 '17 20:12 nguyenthithao

check #22 Go to folder node_modules/react-native-pull-to-refresh/lib change 3 files

PullToRefreshView.ios.js PullToRefreshView.android.js Indicator.js

import React, { PropTypes } from 'react'

to

import React from 'react'
import PropTypes from 'prop-types';

sy92th avatar Dec 16 '17 09:12 sy92th

I believe this should be fixed by #24 which was just merged!

smaclell avatar Dec 17 '17 02:12 smaclell