You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have optimistic updates working great, however, is there a way to determine if a value is optimisitc or not?
My current situation is this:
User Adds item to list
Item gets added optimistically and appears instantly (Request 1)
User decides to delete item
Item gets removed optimisitally (Request 2)
Request 1 returns and add the item back to the list
Request 2 fails as an invalid ID was sent to the server
What I'm after is stopping the user from being able to delete said item until it's back from the server, my only solution is to inject a property into the optimistic value.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have optimistic updates working great, however, is there a way to determine if a value is optimisitc or not?
My current situation is this:
What I'm after is stopping the user from being able to delete said item until it's back from the server, my only solution is to inject a property into the optimistic value.
Beta Was this translation helpful? Give feedback.
All reactions