Reactjs – How to avoid duplicating fallback in both API responses and useQuery in React Query?
In fetchOrgs, I'm already providing a fallback for items like so: items: response.data ?? []. But it seems like TypeScript still thinks data may still be undefined: const orgs: Org[] | undefined So this means I have to provide a…