useEffect and useQuery
I am trying to useEffect with useQuery. My purpose is removing item from collection when someone clicks the delete button. I do not want to refresh page, so i have to use useEffect. I tried something like that, but no change. Do you have any idea about how i can do that?
3 Replies
hmm sounds like an optimistic UI update that you are trying to do? Wasp has native support for that: https://wasp-lang.dev/docs/language/features#the-useaction-hook (look for optimisticUpdate property)
Optimistic UI Update - when you want to update UI without waiting for the server response, to avoid the lag in the UX
Ah, right. Why i am looking for another way. Sorry for that.
no worries, hope this helps! let us know 🙂