Custom query hook and type for placeholderData option
placeholderData option that I'm using with keepPreviousData helper function.We've got our own basic
UseQueryOption type defined with a few of the common options (e.g. enabled, keepPreviousData) that we use with our custom query hooks. Until now, keepPreviousData was simply a boolean, but now placeholderData is a generic type that depends on the response type.What's the best way to type it? Right now, most of our custom query hooks are typed as:
What's the best way to provide a type for
placeholderData in UseQueryOptions?