Skip to content

Add Next.js 13 appDir example to docs #4558

Answered by TkDodo
efilion asked this question in Ideas
Discussion options

You must be logged in to vote

I'm not sure if queryClient.clear() on line 17 of Provider.tsx accomplishes anything here or if having queryClient being garbage-collected after going out of scope is sufficient.

It's not needed, it can be garbage collected because we don't start the timers anymore on the server since v4.


the thing is, I don't think we need hydration with fetches located at component level. One approach is to fetch on the server, then pass the data down to a the client component with initialData. It will also work nicely on type-level because data will always be defined. It's very similar to what react-router v6.4 loaders are doing.

The concept is described here on twitter: https://twitter.com/lukemora…

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
4 replies
@TkDodo
Comment options

@efilion
Comment options

@TkDodo
Comment options

@efilion
Comment options

Answer selected by efilion
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@m4rvr
Comment options

@2manoj1
Comment options

@2manoj1
Comment options

@igortas
Comment options

@2manoj1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
6 participants