Preventing Data Leaks

I am receiving this warning when I change when I change from a certain component to another in my react app. With my current knowledge, I believe that the cause is that some query is running when I change the component. How can I cancel all queries within a compose() to avoid this error? Here I will add a picture of my compose. This is the only area in the code where I believe that the error originates from.

Edit: since new members can only share one picture per post, if you read this, ask for the other picture of the compose or I will try and send it as a reply to this message.


Here is my compose

I’d recommend not to worry about that that much - these error messages have already relaxed in recent React versions and will likely be removed in future React versions, as they cause more concern than they actually solve problems.

That said, I would highly recommend you to start using hooks and function components - the graphql HOC is very old and we will deprecate it in a future version, since the React ecosystem has almost completely moved away from class components since hooks were introduced almost 5 years ago.
We consider that a legacy feature at this point that we still support for backwards compatibility with legacy code, but we would not recommend using it in new code.