3 ms·
> I think that optimistic UI isn't more complex to build: it's just less familiar. Having multiple records of state that have to be resolved when systems come
by stepbeek 3y ago
> I think that optimistic UI isn't more complex to build: it's just less familiar.
Having multiple records of state that have to be resolved when systems come online is complex. Anything requiring consensus is difficult to do.
- thomastjeffery 3y agoThe same complexity is present in both approaches. The only difference is cadence.
- ahzhou 3y agoNot exactly - there’s a bunch of non-trivial stuff you need to worry about when both local and remote states represent sources of truth. Things like CRDTs and event sourcing make it easier, but there’s still more complexity than dealing with only one source of truth. In an online-first experience, any local state being held is (for the most part) an optimization or is intentionally ephemeral. You can just toss it away at a performance penalty if it ever gets too hairy. In an offline-first experience, you need to be very careful that you treat everything like a source of truth. You also need to deal with schema migrations and business logic migrations, since you need those to partially live on the client.