Shared load-state hook tracking data / isLoading / isRefreshing /
error for a single async fetch, with abort handling, retry (reload),
and pull-to-refresh (refresh) that never blanks out existing data.
The fetcher should be wrapped in useCallback by the caller; when its
identity changes (e.g. because an input changed) the data is reloaded.
Shared load-state hook tracking
data/isLoading/isRefreshing/errorfor a single async fetch, with abort handling, retry (reload), and pull-to-refresh (refresh) that never blanks out existing data.The
fetchershould be wrapped inuseCallbackby the caller; when its identity changes (e.g. because an input changed) the data is reloaded.