How to use query.set (prev cache.set) to mutate async data for optimistic updates?
i’m trying to use the undocumented
it works for async data from
when should i use
i’m trying to do following
i’m expecting that it doesn’t create a new request, but rather use the data i set using
i’m using
is my usage correct? how do i properly use it to attain the behavior i described?
(sorry for bad formatting, typing on a phone)
thank you so much!!!
query.set to mutate async data for optimistic updates.it works for async data from
createAsync that’s reactive to param change. however, when i manually revalidate the data (either by calling revalidate somewhere, or revalidating from an action), it fetches fresh data rather than using the query.set i called earlierwhen should i use
query.set if i’m going use revalidate() in order get the data? calling revalidate is the only way to get the data as my query isn’t reactive to a param changei’m trying to do following
i’m expecting that it doesn’t create a new request, but rather use the data i set using
query.seti’m using
query.set to avoid fetching getData() again because i already got the same data when i called createData()is my usage correct? how do i properly use it to attain the behavior i described?
(sorry for bad formatting, typing on a phone)
thank you so much!!!
