doing a thread
but why does it always return undefined when im getting the thing
all args etc. are there
6 Replies
thread here i guess
this always gives me undefined
existing thing doesn't exist
do i need to set something else up for it to fully work
ive not figured it out yet
gonna come back later today
help would be immensly appreciated bc i really do need this
it'd be great to have it for the mvp
ah
ok
it works
i had the wrong thingId
š
jeez, working with a cms gets tricky
ok
seems like optimistic ui, i need something that can handle multiple ones quickly
so im going with some sort of local first approach
i think ive an idea in mind
Convex optimistic updates are pretty great. Did you get it going? I think it is similar to react query if i remember correctly - you're updating the results of specific queries.
i got it going
thanks for following up @erquhart
but i think i need something that can handle multiple actions at once
i think im gonna use local storage for the part where i need this interactivity
Convex optimistic updates can handle multiple actions at once, you can use
getQuery
/setQuery
on as many queries as you like in a single updategotcha
will take another look into it later
not sure why things didnt go as expected
maybe bc im calling
.then
on the mutation and proceeding code inside the then block happens only if write to db is done?Yep exactly
I mean, the optimistic update would synchronously update queries regardless of what you're running after the mutation promise resolves
Can you paste some code here so I can see what you're doing