react-native-webview-crosswalk
react-native-webview-crosswalk copied to clipboard
Cannot read property 'PureRenderMixin' of undefined
After installing App crashes with the following error at line no 7 of index.android.js
"react": "16.0.0-alpha.6", "react-native": "0.44.0", "react-native-webview-crosswalk": "^0.5.0"
Hi, thanks for the report!
This is because React 0.16 is not supported yet. PureRenderMixin has been moved to react-addons-pure-render-mixin in React 0.16.
I haven't gotten around to updating the project, but in general, it isn't kept up to date for alpha or release candidate builds of React or React Native.
Can you suggest a workaround?
I have added
var PureRenderMixin = require('react-addons-pure-render-mixin'); in index.android.js of react-native-webview-crosswalk
and in my js file invoking webview like this
<View style={{flex:1, height:Dimensions.get('window').height-10}}>
<CrosswalkWebView
style={styles.webView}
url={this.state.url}
/>
</View>
But my app crashes, please help.
For now, you'd have to use React 0.15.x, or modify this library to work with React 0.16.
This library isn't compatible with React 0.16 yet, which is still alpha/pre-release status at this time.
However, I'll leave this issue open, as it's relevant to updating the library to work with React 0.16.
react-native 43 and 44 depend on react 16, so we seem to be stuck with that decision. Updating the library to react 16 is necessary to support the latest released versions of react-native. Encountered this today and the app hard crashes. Would love to see a resolution or workaround. Thanks!
Hi there,due to the upgrade of react native the main index.android.js file use different type.Instead of add mixin to component we should create component inherited from React.PureComponent
https://github.com/punksta/react-native-webview-crosswalk/tree/react-native-0.45 you can use my fork with last react-native. It also has upgraded crosswalk.
same issue
+1