You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This bug is solely for the benefit of using react-query with TypeScript.
When specifying the initialData option, I don't think the data prop should be unioned with undefined. Then whenever you want to use the data of the returned object, you have to apply the non-null assertion operator (!) to use it's value.
I assume this also applies to placeholderData but I've not used it so not 100% here.
To Reproduce
Make a call to the useQuery hook with specifying either initialData or placeholderData.
Expected behavior
When either initialData or placeholderData is specified, then data is not unioned with undefined.
justinhp, valtism, knoefel, PeaWarrior, ralphstodomingo and 1 more