Stop using REST for state synchronization (2024)
a year ago
- #state synchronization
- #REST
- #web development
- REST is cumbersome for state synchronization in webapps.
- State transfer protocols like REST lead to repetitive and brittle code.
- Example shows issues with REST in a simple text input scenario.
- Problems include request ordering, spinner logic, and state divergence.
- State synchronization mechanisms like CRDTs could be a better solution.
- Current tools (Automerge, Yjs, Braid, Electric SQL) are promising but need maturity.
- Optimizing for local-first scenarios may not address common webapp needs.