davidhu2000/youtube_desktop

setState on unmounted components warning

davidhu2000 opened this issue · 1 comments

In each category box, whenever the component is unmounted then mounted again, the 'resize' event listener is not properly removed, so constantly getting this warning

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 CategoryBox component.

This is most likely caused by not properly removing event listeners for unmounted components.

issue fixed in pull request #41