In this case there's no memory leak though.
It's simply a warning as updating the state will effectively do nothing after the component has been unmounted.
Ah. I see your point. I suppose the dangling reference to the component gets garbage-collected after the promise resolves and state is updated?
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.