Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
4 replies
scatter

change query params without rerender

When you useMutation with trpc, you call the endpoint with some input when you call .mutate, which is easy enough to do when you click a button or something. Is it possible to do the same with a query? useQuery takes the input and I don't see a way to change that without rerendering and calling useQuery again - eg type something in a text box and use it for a query without rerendering. I know queries and mutations are pretty much the same under the hood so the solution is to just use a mutation instead but it feels semantically weird to the point that I feel like I'm missing something.
Was this page helpful?