#Optimistic updates strange behaviour

4 messages · Page 1 of 1 (latest)

brave surgeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

alpine nest
#

Hi, I've a strange problem with optimistic updates, I am using next 14.0.3

Above code sometimes works as expected but sometimes after clicking delete button optimistic state changes correctly and after a second or so the item returns back to the optimisticCart
Mutation is successful so when I refresh the page the item isn't there

rain harness
#

Maybe you need to deconstruct state.products the same way you’re deconstructing state?

alpine nest
#

I dont think I get it @rain harness Could you elaborate?