-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query Block - Reduce extra network requests #1622
base: release/2.0.0
Are you sure you want to change the base?
Conversation
Noticed that this broke the user select. broken-user.mp4Fixed it easy enough, but should we worry about this if we forget to pass the query client? Could there be a backup perhaps? |
I'm not sure there's a way we could do a fallback that doesn't involve writing the whole fetching logic twice. There's only so many places these components are even used, so it shouldn't be hard to manage which props they need. If anything, we could update the components to throw an error if queryClient is undefined, which they won't do now. this way we can obviously see we made a mistake while developing and fix it, etc. |
Relates to: #1616
In this branch, I add the QueryClientProvider to the plugin and pass the queryClient around so the consuming components can use it. This allows tanstack query to properly cache the queries and not have them happen so often.
Requires components PR: https://github.com/EDGE22-Studios/components/pull/18