Replies: 1 comment 1 reply
-
This unfortunately won't work 😅 either you update the hook's state and programmatically start a new execution or you want to get to the result; having both in one really isn't desirable. For instance, the change diff you posted here would internally start two operations. Now, this isn't bad, but it's also not expected. Instead, it's also possible to directly use In other cases it's more desirable to use the hook's existing state as needed as it'll lead to more consistent effects. Particularly because its lifecycle is more in line with reacting to changes from the client (rather than showing a one off result) A promise-based return value on |
Beta Was this translation helpful? Give feedback.
-
I'm using
useQuery
from react package, and I noticed thatexecuteQuery
doesn't return anything. I'm wondering if you are open to the idea of returning a promise or a source?This is briefly what I'm looking to achieve
And this is the proposed change
Beta Was this translation helpful? Give feedback.
All reactions