react-loading icon indicating copy to clipboard operation
react-loading copied to clipboard

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.

Open simonwatt opened this issue 7 years ago • 3 comments

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.

simonwatt avatar Jul 20 '17 00:07 simonwatt

I have the same issue with IE11.

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

[email protected]

loehx avatar Oct 18 '17 16:10 loehx

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

Mike

mpkelly avatar Feb 15 '18 14:02 mpkelly

Guys is this still valid in version 2.0.0?

fakiolinho avatar Apr 18 '18 20:04 fakiolinho