Replies: 1 comment
-
As a follow up i uploaded a example which has more or less the same problem: From readme: https://github.com/pinkeyAT/react-query-test
Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
im using nextjs with getServerSideProps to fetch initialData.
In the page i pass the initialData to useQuery:
In my first subcomponent i want to access the data from the query with
But it does not work (see comment in code above).
I also tried to set in my main component the queryCache directly with (queryCache.setQueryData). According to the docs its sync so it should be available in my subcomponent but i get still the same error.
Maybe im just using it wrong ... ?
Do i have put both ( useQuery and getQueryData) in a hook and import the hook where i want to access the data like the guy did here #489 ?
Any help is appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions