react-crossfade-image icon indicating copy to clipboard operation
react-crossfade-image copied to clipboard

Does not work with React 16

Open oleksandr-yefremov opened this issue 7 years ago • 1 comments

I was trying to do setInterval(this.changeImage, 1000), but got a crash immediately. package.json uses "react": "^15.5.4", while I am using React 16. Looks like it is the same issue as this one - https://github.com/facebook/react/issues/10320#issuecomment-318754280

TypeError: this.updater.enqueueCallback is not a function
CrossfadeImage../node_modules/react-crossfade-image/node_modules/react/lib/ReactBaseClasses.js.ReactComponent.setState
node_modules/react-crossfade-image/node_modules/react/lib/ReactBaseClasses.js:64
  61 |   !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
  62 |   this.updater.enqueueSetState(this, partialState);
  63 |   if (callback) {
> 64 |     this.updater.enqueueCallback(this, callback, 'setState');
  65 |   }
  66 | };
  67 | 

oleksandr-yefremov avatar Mar 02 '18 16:03 oleksandr-yefremov

Thanks, I updated the dependencies to use React 16.

khanglu avatar Mar 07 '18 00:03 khanglu