Closed winadiw closed 5 years ago
Thanks! It worked for me @winadiw
@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.
Ok thank you for letting me know
close this
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 intovar { PropTypes } = PropTypes;
And you are done. But please update the package if possible.