Async function that returns the data. Wrap in useCallback to
avoid restarting the interval on every render.
Value used for data before the first fetch resolves.
Polling interval in milliseconds.
When true, pauses background polling (does not cancel an in-flight request).
Optional config (e.g. errorThreshold).
Fetches data on mount and then polls at a fixed interval.
The initial load sets
loading = true; subsequent background polls and manualrefresh()calls updatedatasilently without a loading flash.