-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined is not an object (evaluating 'react3.default.PropTypes.bool) #39
Comments
me too |
This is because PropTypes used to be defined in the React module, but has since been extracted to a separate module Try this: then in a file that is required before all others: const React = require('react');
React.PropTypes = require('prop-types'); Remeber that in ~/Project/index.js // require React first
const React = require('react');
// Augment React module with PropTypes
React.PropTypes = require('prop-types');
// Now require our project files. At this point, all references to React will have React.PropTypes defined
const { AppRegistry } = require('react-native');
const { App } = require('./App');
AppRegistry.registerComponent("Project", () => App); |
@chrismcleod It dosn't work this way for me. I've done this:
Still got the same error. Any Idea? BTW: The fork of |
@chrismcleod Thank you,I got it. |
@xstable you need to add "import PropTypes from 'prop-types';" in /node_modules/react-native-view-transformer/library/transform/ViewTransformer.js and change React.PropTypes to PropTypes |
the fork also works for me |
Just got the same issue and read the source code found out it imports another lib as below : |
After I downloaded this package and tried to use it I am geting an error. My code is in the below
import Image from 'react-native-transformable-image'
The text was updated successfully, but these errors were encountered: