-
next.js Version: 13.0.0 in /app/page.tsx import { QueryClient } from "@tanstack/react-query";
...
// throw error
const queryClient = new QueryClient(); |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Oct 27, 2022
Replies: 2 comments 7 replies
-
Everything in app is a server component per default that cannot use context. See: https://twitter.com/lukemorales/status/1585506850421854210 |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
louis-young
-
Is the Twitter thread still the preferred way of fetching initial data? Just checking if we're missing something 🙏 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Everything in app is a server component per default that cannot use context. See: https://twitter.com/lukemorales/status/1585506850421854210