trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

feat: For useRealtimeRuns, allow to disambiguate an empty array from the initial loading state

Open felix-quotez opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

I want to show a loading state in the UI while useRealtimeRuns loads the initial runs.

Currently, while loading, useRealtimeRuns simply returns an empty array that cannot be disambiguated from the initial loading state.

Describe the solution you'd like to see

This might be as simple as returning "isLoading" from "useSWR" in the implementation of "useRealtimeHooks".

Describe alternate solutions

No loading state gets show, bad UX.

Additional information

No response

felix-quotez avatar Nov 23 '24 08:11 felix-quotez