-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
WebView JS Error: undefined is not an object (evaluating '_this.props') #9966
Comments
I'll try to make a sample project that specifically reproduces the issue. Thanks for taking a look. |
After a lot of digging there was a .babelrc and .eslintrc file that were in the directory (from some template project when i started). It seems that it was disabling es6 features in non-jsx files. After removing that the issue was resolved. |
Hello! Im receiving the same error and Im wondering if you could elaborate a bit more about the fix. Our .babelrc is currently
is it perhaps the |
@proProbe do you have a .eslintrc file? My hunch was that it was:
that was not allowing the es6 functions in the react-native .js files (NOTE: this could be entirely wrong). I just deleted both the eslintrc and the .babelrc and it worked after that. |
@johnryan unfortunately we dont have an .eslintrc. Deleting the .babelrc doesnt seem to work either. |
@proProbe do you have any sample code that reproduces the issue? |
does not seem to work for me |
@proProbe when i run it with:
in a fresh project (i.e. react-native init issue9966) and:
It renders as expected. I'd suggest trying to figure out what's different between your project and the fresh one created by react-native-init |
Any progress here ? I'm seeing the same thing. Happens on both iOS and Android. I don't think eslint has anything to do with it though. Also, new projects created with |
Found the issue. {
"passPerPreset": true,
"presets": [
"react-native"
],
"plugins": [
"transform-class-properties"
]
} You need to explicitely specify |
@kamek-pf you should remove "passPerPreset" if you set it only for babel-relay-plugin. Class properties should just work with "react-native" preset. |
@chirag04 good to know, thanks ! |
Issue Description
I'm using QR code library that internally renders in a WebView (https://github.com/cssivision/react-native-qrcode/issues). When the webview renders it throws the error but does actually render the WebView behind the red box:
This issue began in 0.32.0 it seems with this change:
_onLoadingStart: function(event: Event) { ...
To:
_onLoadingError = (event: Event) => { ...
Steps to Reproduce / Code Snippets
Just rendering the QR Code view with this snippet (that is being presented with Navigator)
Expected Results
There should be no error displayed
Additional Information
Other notes: This seems to be happening in several other places
The text was updated successfully, but these errors were encountered: