sambernard / react-preload

Component to preload images before showing content

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning on route change

kennypascal opened this issue · comments

It appears switching to a new route while images are still preloading will cause an error. This may occur because there is no componentWillUnmount to clear the event listeners?

warning.js?0260:45 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the undefined component.warning @ warning.js?0260:45getInternalInstanceReadyForUpdate @ ReactUpdateQueue.js?fd2c:34ReactUpdateQueue.enqueueSetState @ ReactUpdateQueue.js?fd2c:181ReactComponent.setState @ ReactComponent.js?702a:65_handleSuccess @ Preload.js?631e:113

Fixed in 0924f29