Description
We're currently getting this log error when any Cover, Article or Gallery block is unmounted without finishing the request.
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
We solve this by implementing a clean up function to the useEffect hook and aborting all the API fetch that were requested by any Block. Here is the React documentation
Doing this we will avoid to run a ton of unexpected requests.
Blocks affected:
- CoversEditor
- ArticlesEditor
- GalleryEditor