sghiassy / react-native-sglistview

SGListView is a memory minded implementation of React Native's ListView
MIT License
743 stars 72 forks source link

undefined is not an object (evaluating '_react.proptypes.element') #62

Closed alicompiler closed 6 years ago

alicompiler commented 6 years ago

import SGListView from 'react-native-sglistview'; i'm just importing the listview and i got

undefined is not an object (evaluating '_react.proptypes.element')

react-native-cli: 2.0.1 react-native: 0.49.3

libdib commented 6 years ago

PropTypes have been moved to a separate package as of 0.48 (as I recall).

TolgaCagin commented 6 years ago

Same Problem react-native-cli: 2.0.1 react-native: 0.50.4

martinosmartinos commented 6 years ago

@TolgaCagin Import react native prop-types and create-react-class. You have to modify this package in general. Link below was quite helpful for me to do so: https://reactjs.org/blog/2017/04/07/react-v15.5.0.html#migrating-from-reactcreateclass

danielgarciasantos commented 6 years ago

Same Problem

martinosmartinos commented 6 years ago

@danielgarciasantos you have to modify this package and include where applicable (SGListView.js, SGViewCell.js) : var PropTypes = require('prop-types'); var createReactClass = require('create-react-class');

Follow https://reactjs.org/blog/2017/04/07/react-v15.5.0.html#migrating-from-reactcreateclass and your 'red screen of death' for further modifications.

sghiassy commented 6 years ago

Can you submit a PR? That’d be great

On Wed, Jan 10, 2018 at 2:15 PM martinosmartinos notifications@github.com wrote:

@danielgarciasantos https://github.com/danielgarciasantos you have to modify this package and include where applicable (SGListView.js, SGViewCell.js) : var PropTypes = require('prop-types'); var createReactClass = require('create-react-class');

Follow https://reactjs.org/blog/2017/04/07/react-v15.5.0.html#migrating-from-reactcreateclass and your 'red screen of death' for further modifications.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sghiassy/react-native-sglistview/issues/62#issuecomment-356755378, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwYHvOgranGoP-JoYwokIDxwxMpIkiTks5tJTaJgaJpZM4QVFAb .

martinosmartinos commented 6 years ago

Sure, will do!

danielgarciasantos commented 6 years ago

I wait for RD,

martinosmartinos commented 6 years ago

Done. Should be in a review now.

danielgarciasantos commented 6 years ago

merged 👍 ?

martinosmartinos commented 6 years ago

@danielgarciasantos it is not up to me anymore:) You could try get changes from latest PR and see if it works for you.

danielgarciasantos commented 6 years ago

Okay, thanks, I'll try.

danielgarciasantos commented 6 years ago

resolved with PR..... @martinosmartinos

martinosmartinos commented 6 years ago

@danielgarciasantos good to hear!