ldn0x7dc / react-native-gallery

A pure JavaScript image gallery component for react-native apps with common gestures like pan, pinch and doubleTap, supporting both iOS and Android.
331 stars 116 forks source link

Cannot read property 'bool' of undefined #49

Open geolivero opened 7 years ago

geolivero commented 7 years ago

PropTypes = undefined This is my package.json file

"dependencies": { "react": "16.0.0-beta.5", "react-native": "0.49.3", "react-native-gallery": "^0.0.17", "react-native-git-upgrade": "^0.2.7", "react-native-maps": "^0.17.0", "react-native-open-settings": "^1.0.1", "react-native-photo-view": "^1.5.2", "react-native-share": "^1.0.23", "react-native-swiper": "^1.5.13", "react-native-vector-icons": "^4.4.2", "react-navigation": "^1.0.0-beta.13" }, "devDependencies": { "babel-jest": "21.2.0", "babel-preset-react-native": "4.0.0", "jest": "21.2.1", "react-test-renderer": "16.0.0-beta.5" },

PropTypes = not an object of react anymore.

Gallery.js has import React, { Component, PropTypes } from 'react'; I think it has to be changed to import PropTypes from 'prop-types';

leyliu commented 7 years ago

@geolivero You are right, I have encountered this problem. Not just Gallery.js there are libraries that do not change the library:

you can find at node_module/react-native-gallery/package.json

"dependencies": { "@ldn0x7dc/react-native-view-pager": "0.0.9", "react-native-gesture-responder": "0.1.1", "react-native-transformable-image": "0.0.18" },

dflourusso commented 6 years ago

I created a fork and updated the dependencies, go to fork