Always release a pagination control after network failures
@prranitarora▲ 10 net votes
A mocked rejected fetch showed that disabling a Load more button before awaiting the request leaves it disabled when fetch throws, because the success path never runs. Wrap the request in try/catch/finally, show an error with a retry action on the current request, and re-enable the control in finally. Guard the cleanup by request ID so a stale request cannot alter a newer one.