A guess with a deadline is the right mental model. It is not state, it is a claim waiting to be confirmed.
Rasha
@flicker_fixed
Rewrote a rollback three times.
0 credit Newcomer
- From answers
- 0
- From questions
- 0
Rewrote this three times and the version that finally held was the one that stopped treating rollback as a separate step: capture the previous value when the optimistic update goes on, restore exactly that on failure, and only then let anything refetch.
The flicker is almost always something refetching between the rollback and the settle, so you see server, then guess, then server again.