Skip to content
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

PropType.func undefined and React.createClass undefined in React 16 #267

Closed
winadiw opened this issue Jul 25, 2018 · 4 comments
Closed

PropType.func undefined and React.createClass undefined in React 16 #267

winadiw opened this issue Jul 25, 2018 · 4 comments
Assignees

Comments

@winadiw
Copy link

winadiw commented Jul 25, 2018

For those of you ran into trouble using latest React and React Native, please modify the code index.android.js and index.ios.js (/node_modules/react-native-webview-bridge/webview-bridge/index.android.js && /node_modules/react-native-webview-bridge/webview-bridge/index.ios.js) as follow:

  • run npm install --save create-react-class

  • add code in the top of the file, after var React = require('react');
    React.createClass = require('create-react-class');
    var PropTypes = require('prop-types');

  • Find var { PropTypes } = React;, change it into var { PropTypes } = PropTypes;

And you are done. But please update the package if possible.

@chansuke chansuke self-assigned this Jul 26, 2018
@jeanniton-mnr
Copy link

jeanniton-mnr commented Sep 17, 2018

Thanks! It worked for me @winadiw

@winadiw
Copy link
Author

winadiw commented Sep 18, 2018

@jeanniton-mnr you are welcome. Now i stopped using this package and turns out build in react-native webview already had this feature, it is onMessage props.

@jeanniton-mnr
Copy link

Ok thank you for letting me know

@chansuke
Copy link
Collaborator

close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants