Software Development

CRDT in 2026: Yjs vs Automerge vs Loro and When Not to Use One

Marcus Rhee
6 min read
A developer evaluating different data architecture models at a desk

Quick Answer

Choose Yjs for mature JavaScript collaboration, Automerge for document history and JSON-like models, and Loro only after validating its fit in your stack. Skip CRDTs when a server can serialize changes cheaply or correctness requires a single authoritative decision. The difficult part is not merging text, it is owning sync, persistence, authorization, and compaction over the product's lifetime.

Introduction

For most teams building real-time editors in 2026, Yjs is the practical default CRDT because its shared types and integration ecosystem reduce implementation risk. Automerge is compelling when durable document history and a JSON-shaped programming model matter more than per-operation efficiency, while Loro deserves evaluation when its API model matches your data. The library decision sits inside broader distributed systems challenges, including reconnect behavior, identity, and data retention. A collaborative cursor demo proves almost nothing about the production system behind it.

Key Takeaways

  • Yjs remains the lower-risk choice for JavaScript-heavy collaborative editors.

  • Automerge favors history-aware documents and cross-platform data models.

  • CRDTs add operational cost that simple centralized workflows often avoid.

Close up of hands arranging modular data nodes on a desk

CRDT library choices start with your replication boundary

A CRDT implementation is not a synchronization product. It gives replicas a merge rule, but your application still needs a transport, peer discovery or server routing, persistence, schema evolution, access control, observability, and recovery from damaged state. Treat the document boundary as an API contract, because changing it after users create long-lived documents becomes expensive.

Choose data types before choosing a runtime

Text editing, structured records, presence, and financial state should not share one replication strategy by default. For real-time collaboration, CRDTs work best when each replicated field has a clear merge semantic and conflicts are acceptable outcomes rather than hidden failures. Choose a sequence CRDT based on the editing behavior and data model you need.

  • Text: Preserve concurrent inserts without central ordering.

  • Maps: Merge independent field changes predictably.

  • Presence: Keep ephemeral cursor data outside persisted documents.

  • Permissions: Enforce authorization at the server boundary.

Measure the workload you will actually ship

Benchmarking should replay your real document sizes, edit patterns, reconnect sequences, and concurrent writers, not a synthetic append loop. The common benchmarking methodology mistakes are measuring only mutation latency while ignoring encoded updates, memory growth, startup hydration, and compaction. The distinction between state-based and operation-based CRDTs is less useful than understanding whether your sync protocol can efficiently exchange the changes your users generate.

Developer reviewing technical blueprints in a dark office

Yjs vs Automerge vs Loro: the engineering trade-offs

These libraries solve the same class of problem but expose different authoring models and operational burdens. Yjs exposes internal structures as shared types, which makes its mutation model explicit and gives teams a direct path for collaborative text, arrays, maps, and rich editor bindings. The Yjs GitHub repository describes Yjs as a CRDT implementation that exposes its internal data structure as shared types.[1] Automerge's own documentation describes it as a CRDT with a JSON-like data model offering full history and time-travel debugging.[2]

Compare the properties that affect production operations

The table isolates choices that change implementation and maintenance work. Bundle size and universal throughput figures are deliberately absent because neither varies independently of runtime, bindings, document shape, encoding, and transport.

Library

Document model

Document history

Operational implication

Yjs

Explicit shared types

Application-managed retention

Requires disciplined update persistence and cleanup

Automerge

JSON-shaped documents

Full history and time travel

Uses a JSON data model

Loro

CRDT document API, JSON-schema compatible

Time travel and version control

Validate bindings, storage, and migration paths

Yjs is a CRDT implementation that exposes its internal data structure as shared types. Automerge provides full history and time-travel. Loro's documentation confirms it is also JSON-schema compatible with time-travel support, but it should still pass a prototype involving your editor, persistence layer, and offline recovery before it becomes a core dependency.[3]

Architecture should drive the library decision

WebRTC mesh synchronization keeps document data off a relay, but connection-management overhead rises as participant counts grow; hub-and-spoke can scale to thousands of editors while placing authentication enforcement at the hub. That is a product architecture decision, not a Yjs, Automerge, or Loro checkbox. Teams should apply system design trade-offs before optimizing the CRDT layer.

When not to use CRDTs

Do not introduce a CRDT when users rarely edit the same record concurrently and a server-side write API can reject stale versions or serialize updates. Is the CRDT approach overkill for small-scale apps? Usually, yes, when an ordinary database transaction, optimistic version field, or short-lived lock supplies clearer failure behavior with less metadata and fewer synchronization states.

Strong consistency is not an optional feature

CRDTs converge, but convergence does not guarantee that every intermediate decision was valid. A research paper on OT and CRDT consistency provides additional context for that trade-off.[4] Payment balances, inventory reservations, entitlement changes, compliance workflows, and irreversible actions need a single authority to check invariants before committing state. The tension between CRDTs and operational transformation also matters: OT remains viable for established centralized editing systems, while CRDTs offer a stronger offline story for new collaborative products.

Use plain coordination when the business rule is sequential

If the rule is "only one person may approve this request" or "never oversell this item," encode that rule in a transactional service rather than hoping a merge policy implies it. A server-issued lease, compare-and-swap write, or queue is often easier to audit and explain. DevvPro's coverage of distributed systems fundamentals is useful context because every offline replica expands the failure modes you must test.

A wide shot of a complex architectural workspace with a developer

Conclusion

Yjs exposes its internal data structure as shared types. Apply system design principles to the surrounding persistence, authorization, and recovery requirements. Avoid CRDTs for centralized, low-contention workflows and invariant-heavy state.

Need a clearer framework for distributed collaboration decisions? DevvPro's engineering analysis offers more context.

Frequently Asked Questions (FAQs)

What are CRDTs and why do developers use them?

CRDTs are replicated data structures that merge concurrent changes deterministically, allowing users to keep working through network interruptions without requiring every edit to wait for a central server.

How do CRDTs solve concurrency conflicts?

CRDTs solve concurrency conflicts by defining merge behavior in the data type itself, so independently produced operations or states converge after replicas exchange updates.

Is a CRDT the right choice for my collaborative project?

A CRDT is the right choice when offline editing and concurrent collaboration are core requirements, and the product can tolerate deterministic merges instead of globally serialized decisions.

What is the difference between operational transformation and CRDT?

Operational transformation rebases edits against a coordinated operation history, while a CRDT embeds merge semantics in replicated data so replicas can converge without the same central sequencing requirement.

Are there performance trade-offs when using CRDTs?

CRDT performance trade-offs include additional metadata, memory pressure, synchronization payloads, and recovery work, which must be evaluated using representative documents and collaboration patterns.

What are the most common challenges with CRDT implementation?

Common CRDT implementation challenges include schema evolution, update persistence, authorization, garbage collection, transport failures, and making merged outcomes understandable to users.

Sources

  1. GitHub - yjs/yjs: Shared data types for building collaborative software — GitHub ↩
  2. Automerge (automerge.org) ↩
  3. Introduction to Loro (loro.dev) ↩
  4. Research paper on collaborative editing, operational transformation, and strong consistency (arxiv.org) ↩

About the Author

Marcus RheeDeveloper Advocate and Tech Strategist focused on developer tools, API design, SaaS architecture, and software-driven businesses. He examines engineering decisions through both implementation constraints and product outcomes.