fakiolinho / react-loading

React component for loading animations

Home Page:https://codesandbox.io/s/mqx0ql55qp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

simonwatt opened this issue · 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.

I have the same issue with IE11.

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

react-loading@0.1.4

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

Mike

Guys is this still valid in version 2.0.0?