Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

undefined is not an object (evaluating 'react.PropTypes.shape') ? #39

Open
ghost opened this issue Feb 19, 2018 · 5 comments
Open

undefined is not an object (evaluating 'react.PropTypes.shape') ? #39

ghost opened this issue Feb 19, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 19, 2018

No description provided.

@swingywc
Copy link

Having same error in react-native v0.52.0 together with react-native-lazyload v1.1.0. Does anyone figure out the problem?

@nguyenvanphuc2203
Copy link

Having same error ! please help me

@IliRusli
Copy link

+1

@SvetoslavSlavov
Copy link

SvetoslavSlavov commented Jun 21, 2018

The error happens because PropTypes in React 16 is deprecated. You should use the prop-types package from npm instead. Go to the Anim.js, LazyloadImage.js, LazyloadListView.js, LazyloadScrollView.js, LazyloadView.js.
Change the import from
import React, { Component, PropTypes } from 'react';
to
import React, { Component } from 'react';
import PropTypes from 'prop-types';
You can also use the project of soldotno https://github.com/soldotno/react-native-lazyload-deux

@skantus
Copy link

skantus commented Jul 21, 2019

The error happens because PropTypes in React 16 is deprecated. You should use the prop-types package from npm instead. Go to the Anim.js, LazyloadImage.js, LazyloadListView.js, LazyloadScrollView.js, LazyloadView.js.
Change the import from
import React, { Component, PropTypes } from 'react';
to
import React, { Component } from 'react';
import PropTypes from 'prop-types';
You can also use the project of soldotno https://github.com/soldotno/react-native-lazyload-deux

Thanks for helping, here is the updated repo:

https://github.com/skantus/react-native-lazyload

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants