Why useQuery data is not exposed directly? #3409
Answered
by
JoviDeCroock
beinoriusju
asked this question in
Q&A
-
When an URQL query loads data it's not directly accessible (eg. data), but through a query key (eg. data.todos) which does not make sense to me. Can someone explain why this is and if there are any good URQL react hooks in the wild that I'm might be missing out? See example from docs:
|
Beta Was this translation helpful? Give feedback.
Answered by
JoviDeCroock
Oct 23, 2023
Replies: 1 comment
-
Because you are selecting the data you need, nothing stops you from doing:
Then todos can't be directly accessible as you also need data.todo and data.authors |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JoviDeCroock
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because you are selecting the data you need, nothing stops you from doing:
Then todos can't be directly accessible as you also need data.todo and data.authors