farazshaikh / react-native-country-code-telephone-input

International telephone number picker component for react-native
MIT License
23 stars 15 forks source link

Trouble with Prop Types #4

Open pabloIO opened 6 years ago

pabloIO commented 6 years ago

I was trying to use this module, but I find a problem that made build again all my project, it was with the Prop Types module from React. But in the latest versions the way to call it is: import { PropTypes } from 'prop-types';

So the fix for countryPicker.js is first import it

import { PropTypes } from 'prop-types';

and on static propTypes variable static propTypes = { onChange: PropTypes.func.isRequired, }

Also in phoenumberpicker.js import { PropTypes } from 'prop-types'; And then defining the propTypes class variable: PhoneNumberPicker.propTypes = { onChange: PropTypes.func, countryHint: PropTypes.object, }

farazshaikh commented 6 years ago

this seems to have been fixed by folks, can you please send in the fix.