Re fetch an enabled tRPC query.
Hi, im running into an issue where I want to refetch a query that lists all users when a new user is added, but it only refetches when the query is disabled. this is some code I have for it.
I tried to do the button like this but for whatever reason it only works if i have the query disabled
Any help/suggestions on how to fix this would be greatly appreciated
5 Replies
you sure its not just you reloading before the changes happen
because it doesnt happen in 0ms
you should probably do it onsuccess and not immediately after
well yeah but i also did this:
and this worked
I think it should be something like that:
thank you so much, it works
i guess if i just do a normal await it returns loading or something
what
you dont await no