Open hitchcocknz opened 6 years ago
Updated the import statement as above but still getting an error : Cannot read property 'oneOf' of undefined ExceptionsManager.js:65 Module AppRegistry is not a registered callable module (calling runApplication)
import PropTypes from 'prop-types'; is the correct import statement. Have you ensured the "prop-types" module was installed i.e. npm install --save prop-types.
When I modified the code most of it was in the react-native-vector-icons code that sits under react-native-multiple-select-list code in node_modules.
Added prop-types. Still getting the error - Cannot read property 'proptypes.oneOf' of undefined.
I fixed this temporarily by manually changing (in multiSelect.js):
import React, { Component, PropTypes } from "react";
to
import React, { Component } from "react";
import PropTypes from "prop-types";
Then changing:
import Icon from 'react-native-vector-icons/Ionicons';
to
import Icon from 'react-native-vector-icons/dist/Ionicons';
.
I'm using react-native-vector-icons v4.6.0.
I fixed this temporarily by manually changing (in multiSelect.js):
import React, { Component, PropTypes } from "react";
to
import React, { Component } from "react";
import PropTypes from "prop-types";
Then changing:
import Icon from 'react-native-vector-icons/Ionicons';
to
import Icon from 'react-native-vector-icons/dist/Ionicons';
.I'm using react-native-vector-icons v4.6.0.
why dont lib maintainer resolve this issue
I fixed this temporarily by manually changing (in multiSelect.js):
import React, { Component, PropTypes } from "react";
to
import React, { Component } from "react";
import PropTypes from "prop-types";
Then changing:
import Icon from 'react-native-vector-icons/Ionicons';
to
import Icon from 'react-native-vector-icons/dist/Ionicons';
.I'm using react-native-vector-icons v4.6.0.
You Did ok for PropTypes. But for VectorIcons it should be like this: import {Ionicons as Icon } from 'react-native-vector-icons'
As of React 16.0.0, react module no longer contains PropTypes.
Need to change to import PropTypes from 'prop-types';