How to wait for `setQueryData` in `mutation.onSuccess`?
How to wait here until the query is updated?
As the operation is not synchronous as it seems the query isn't populated at that point. Is there any way to make it synchronous or wait for the execution?
2 Replies
dependent-tan•2w ago
setQueryData is synchronous so there's nothing to await
national-goldOP•2w ago
That's odd because the data signal that has just been set is still empty.
If I wrap it in
setTimeout it's populated.
maybe it's a signal timing issue
Just for reference.