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

hey man , is does'n work ! ... how ?

Open zdJOJO opened this issue 7 years ago • 3 comments

import ProgressiveImage   from "react-progressive-image-loading";
 <ProgressiveImage
          preview="/src/preview.jpg"
          src="/src/bk-1.jpg"
          transitionTime={500}
          transitionFunction="ease"
          render={(src, style) => <img src={src} style={style} />}
        />

warning.js:35 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of MyComponent. in MyComponent printWarning @ warning.js:35 warning @ warning.js:59 createElement @ ReactElementValidator.js:192 render @ index.jsx:30 (anonymous) @ ReactCompositeComponent.js:795 measureLifeCyclePerf @ ReactCompositeComponent.js:75 _renderValidatedComponentWithoutOwnerOrContext @ ReactCompositeComponent.js:794 _renderValidatedComponent @ ReactCompositeComponent.js:821 performInitialMount @ ReactCompositeComponent.js:361 mountComponent @ ReactCompositeComponent.js:257 mountComponent @ ReactReconciler.js:45 performInitialMount @ ReactCompositeComponent.js:370 mountComponent @ ReactCompositeComponent.js:257 mountComponent @ ReactReconciler.js:45 mountComponentIntoNode @ ReactMount.js:104 perform @ Transaction.js:143 batchedMountComponentIntoNode @ ReactMount.js:126 perform @ Transaction.js:143 batchedUpdates @ ReactDefaultBatchingStrategy.js:62 batchedUpdates @ ReactUpdates.js:97 _renderNewRootComponent @ ReactMount.js:319 _renderSubtreeIntoContainer @ ReactMount.js:401 render @ ReactMount.js:422 ./src/index.jsx @ index.jsx:54 webpack_require @ bootstrap 195e962419c58229becf:676 fn @ bootstrap 195e962419c58229becf:87 0 @ bundle.js:45254 webpack_require @ bootstrap 195e962419c58229becf:676 ./node_modules/@blueprintjs/core/dist/accessibility/focusStyleManager.js.Object.defineProperty.value @ bootstrap 195e962419c58229becf:722 (anonymous) @ bootstrap 195e962419c58229becf:722 invariant.js:44 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of MyComponent. at invariant (invariant.js:44) at instantiateReactComponent (instantiateReactComponent.js:74) at instantiateChild (ReactChildReconciler.js:44) at ReactChildReconciler.js:71 at traverseAllChildrenImpl (traverseAllChildren.js:77) at traverseAllChildrenImpl (traverseAllChildren.js:93) at traverseAllChildren (traverseAllChildren.js:172) at Object.instantiateChildren (ReactChildReconciler.js:70) at ReactDOMComponent._reconcilerInstantiateChildren (ReactMultiChild.js:185) at ReactDOMComponent.mountChildren (ReactMultiChild.js:224)

zdJOJO avatar Sep 04 '17 09:09 zdJOJO

@zdJOJO Could it be an issue with the import, maybe you can try:

import * as ProgressiveImage from "react-progressive-image-loading";

wcandillon avatar Sep 04 '17 13:09 wcandillon

i 've tried this way, but it also does not work. Thank you for your reply :)

zdJOJO avatar Sep 04 '17 13:09 zdJOJO

@zdJOJO could you please try to setup an example with https://stackblitz.com/ ?

ChrisJamesC avatar Sep 04 '17 16:09 ChrisJamesC