use query results in state
Hi, I want to query my database for routes, and then set the DashboardState with the data from the query result. How can I do this?
3 Replies
onSuccess property of useQuery
thank you
does react query not store the result of a query in state?
const routes = api.example.getRoutes.useQuery();
As in, is this not already your state
when it's returned