Skip to content
Discussion options

You must be logged in to vote

it creates an observer, it will re-render your component whenever new changes to this query come in (even with enabled: false). What you could do is notifyOnChangeProps: [] to opt out of re-rendering, but there's still overhead of managing observers.

I'd rather go the way that trpc or zodios are going and offer type-safe versions of the queryClient, based on an up-front defined api definition. In case of trpc, this definition happens on the server. For zodios, it can be on the server or on the client.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@denisborovikov
Comment options

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