undefined is not an object ( evaluatin g'_react3.default.PropTypes.array')
PManager1 opened this issue · 6 comments
Heres my package
{
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"test": "node ./node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/samples": "2.1.1",
"expo": "^24.0.0",
"react": "16.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-24.0.0.tar.gz",
"react-native-autocomplete-select": "^1.0.0",
"react-navigation": "^1.0.0-beta.21"
},
"devDependencies": {
"jest-expo": "^24.0.0"
}
}
I am having the same issue.
same issue - these props types are so annoying
Same issue, Unable to user it.
React.PropTypes is no longer valid in react 16. The AutoComplete.js needs to be updated.
import PropTypes from 'prop-types';
AutoComplete.propTypes = {
suggestions: PropTypes.array,
value: PropTypes.string,
minimumSimilarityScore: PropTypes.number,
comparationFuzziness: PropTypes.number,
suggestionObjectTextProperty: PropTypes.string,
onChangeText: PropTypes.func,
onSelect: PropTypes.func.isRequired,
suggestionsWrapperStyle: PropTypes.any,
suggestionStyle: PropTypes.any,
suggestionTextStyle: PropTypes.any,
style: PropTypes.any,
inputStyle: PropTypes.any
}
Same issue.
Following are my version details
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
react-native-cli: 2.0.1
Help me
@blabz-rahulmandalkar
Go to your node_modules folder, add import PropTypes from 'prop-types';
at the top of the file node_modules/react-native-autocomplete-select/AutoComplete/AutoComplete.js
.
Then scroll down in the file, find and replace the AutoComplete.propTypes = ...
by @jacqueswho 's
AutoComplete.propTypes = {
suggestions: PropTypes.array,
value: PropTypes.string,
minimumSimilarityScore: PropTypes.number,
comparationFuzziness: PropTypes.number,
suggestionObjectTextProperty: PropTypes.string,
onChangeText: PropTypes.func,
onSelect: PropTypes.func.isRequired,
suggestionsWrapperStyle: PropTypes.any,
suggestionStyle: PropTypes.any,
suggestionTextStyle: PropTypes.any,
style: PropTypes.any,
inputStyle: PropTypes.any
}