Skip to content
Discussion options

You must be logged in to vote

since the provider is probably tiny

the provider is tiny, but the new QueryClient() is not. It contains the caches and all the logic, it's most of the bundle size.

maybe one way to do it would probably be to put the QueryClientProvider into a component that your ender in your App, and then have this component be lazy loaded.

However, this would mean that every page that has react-query would need to be rendered inside this component, and the queryClient would not be shared.

I don't see this as benefitial

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@michaelschufi
Comment options

@TkDodo
Comment options

@michaelschufi
Comment options

Answer selected by louis-young
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants