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

Uncaught Invariant Violation: Loading.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object. #29

Open
simonwatt opened this issue Jul 20, 2017 · 3 comments

Comments

@simonwatt
Copy link

simonwatt commented Jul 20, 2017

Any time I try and return the react-loading component on Android 4.4 WebView (via a PhoneGap app) I get the following error:

"Uncaught Invariant Violation: Loading.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object."

The same code is working perfectly fine on newer versions of Android and iOS UIWebView, and is also working fine on all browsers I tried (including Chrome).

Relevant code on my App looks like:

     return (<ReactLoading type="spin" height='30px' width='30px' />)  

If I replace that code with the following I don't get an error which is another reason I think the issue is with the component rather than my code.

    return (<div>loading...</div>)  

I'm having issues with the source map not working, so don't have a better stack trace for now other than the following:

"Error: Loading.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.
at invariant (file:///android_asset/www/bundle.js:2315:15)
at ReactCompositeComponent._renderValidatedComponent (file:///android_asset/www/bundle.js:116621:143)
at ReactCompositeComponent.performInitialMount (file:///android_asset/www/bundle.js:116152:30)
at ReactCompositeComponent.mountComponent (file:///android_asset/www/bundle.js:116048:21)
at Object.ReactReconciler.mountComponent (file:///android_asset/www/bundle.js:12014:35)
at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (file:///android_asset/www/bundle.js:120536:44)
at ReactDOMComponent.Mixin._createInitialChildren (file:///android_asset/www/bundle.js:117512:32)
at ReactDOMComponent.Mixin.mountComponent (file:///android_asset/www/bundle.js:117331:12)
at Object.ReactReconciler.mountComponent (file:///android_asset/www/bundle.js:12014:35)
at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (file:///android_asset/www/bundle.js:120536:44)"

I am using version 0.1.4.

@loehx
Copy link

loehx commented Oct 18, 2017

I have the same issue with IE11.

<ReactLoading type="spin" delay={ 0 } width={ 32 } color="#62c3d4" />

[email protected]

@mpkelly
Copy link

mpkelly commented Feb 15, 2018

I'm experiencing this same error on IE11 (no problem on other browsers). Did anyone find a solution?

Mike

@fakiolinho
Copy link
Owner

Guys is this still valid in version 2.0.0?

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

No branches or pull requests

4 participants