triggerdotdev/trigger.dev

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

Opened this issue · 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