Replies: 1 comment 1 reply
-
I think calling so, I'm not so sure this is the right way to go. Even though having the possibility to type narrow depending on props passed to If you are up for it, please create a PR. Your PoC already looks quite complex imo, but I'm happy to take a look at an actual PR. We have to balance the benefit vs maintainability for sure, but I'd love if we could get this done :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently,
useQuery
always returnQueryObserverResult<D, E>
even if we setsuspense
,error boundary
orenabled
options. For example)what if state is limited by configuring options?
pros
cons
caveat
PoC
https://codesandbox.io/s/determined-yonath-bg5oq?file=/src/usePerformQuery.ts:1572-1606 (implementation)
https://codesandbox.io/s/determined-yonath-bg5oq?file=/src/UserProfile.tsx (usage example)
Beta Was this translation helpful? Give feedback.
All reactions