Building Collaborative applications in React
summary
HackerRank adds real-time collaboration by implementing two approaches: a rebuilt OT library (originally Firepad) refactored into an adapter-based system for editors and databases, and a CRDT path using Yjs over WebRTC with shared arrays/maps/text. A demo is a collaborative to‑do driven by a 20-line hook that pushes to a Yjs shared array and observes updates; OT requires a central server and syncs only text, CRDT supports peer‑to‑peer and eventual consistency and already powers cursor and presence features.
AI-written summary · about
