DEV Community

Discussion on: Using refs to check if a component is still mounted.

Collapse
 
futureistaken profile image
R Z

Do you really think it's good to keep fetching data when the user has left the current page? The request should be aborted, not just suppressed.

Collapse
 
pallymore profile image
Yurui Zhang
Collapse
 
blackr1234 profile image
blackr1234 • Edited

This is a useful article too, thanks for the reference.

Collapse
 
tusharkashyap63 profile image
Tushar Kashyap • Edited

Here, the request is being made just one additional time and that too because a user got frustrated(this won't be happening for the majority of time)

Abort Controller isn't even supported by IE11 and I think a wasted API call isn't always as bad as a memory leak.