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

Cannot read property 'PureRenderMixin' of undefined #53

Open
tarun29061990 opened this issue May 11, 2017 · 8 comments
Open

Cannot read property 'PureRenderMixin' of undefined #53

tarun29061990 opened this issue May 11, 2017 · 8 comments

Comments

@tarun29061990
Copy link

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"

@jordaaash
Copy link
Owner

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.

@tarun29061990
Copy link
Author

tarun29061990 commented May 12, 2017

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.

@jordaaash
Copy link
Owner

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.

@lucasgray
Copy link

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!

@Obooman
Copy link

Obooman commented Jun 9, 2017

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

Demo Gist Here - index.android.js

@punksta
Copy link

punksta commented Jun 11, 2017

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.

@m860
Copy link

m860 commented Jul 5, 2017

same issue

@RafaelHovhannisyan
Copy link

+1

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

7 participants