# Loro > Documentation for Loro ## Pages - [Loro Documentation](loro-documentation.md) - [FILE: pages/changelog/v1.8.0.mdx](file-pageschangelogv180mdx.md): Events now fire **synchronously** - [FILE: pages/changelog/v1.0.0-beta.mdx](file-pageschangelogv100-betamdx.md): version: "v1.0.0" - [category: ["Encoding", "Tree"]](category-encoding-tree.md): We are very excited to announce the release of Loro v1.0, a major milestone. - [FILE: pages/changelog/v1.3.0.mdx](file-pageschangelogv130mdx.md): - UndoManager's`onPush`now can access the change event. - [FILE: pages/changelog/v1.1.0.mdx](file-pageschangelogv110mdx.md): -`forkAt(frontiers: Frontiers)`: Fork the document at the given frontiers. - [FILE: pages/changelog/inspector-v0.1.0.mdx](file-pageschangeloginspector-v010mdx.md): Try it here: [Loro Inspector](https://inspector.loro.dev/) - [FILE: pages/changelog/v1.5.0.mdx](file-pageschangelogv150mdx.md): `doc.subscribePreCommit(listener)`- Modify commit options before processing: - [FILE: pages/changelog/v1.4.7.mdx](file-pageschangelogv147mdx.md): - You can get the version of Loro by`LORO_VERSION` - [FILE: pages/changelog/v1.2.0.mdx](file-pageschangelogv120mdx.md): - Add`isDeleted()`method to all container types (Text, Map, List, Tree, etc.) - [FILE: pages/changelog/v1.6.0.mdx](file-pageschangelogv160mdx.md): Snapshot import speed is now 2x. - [FILE: pages/changelog/v1.4.0.mdx](file-pageschangelogv140mdx.md): - add`unsubscribe()`for Subscription. - [FILE: pages/docs/examples.mdx](file-pagesdocsexamplesmdx.md): keywords: "crdt, example, get started, excalidraw" - [Examples](examples.md): You can find the examples of basic usage in [Loro examples in Deno](https://github.com/loro-dev/loro-examples-deno); - [Loro Inspector](loro-inspector.md): [Loro Inspector](https://inspector.loro.dev/) is an open-source web tool that helps developers debug and visualize Lo... - [Container ID](container-id.md): A Container ID is a unique identifier that comes in two forms: - [Batch Import](batch-import.md): When importing multiple updates into a document, using`doc.importBatch(updates)`is significantly faster than import... - [Storing Timestamps](storing-timestamps.md): You can enable timestamp recording through`setRecordTimestamp`, allowing Unix timestamps to be logged in each`Chang... - [FILE: pages/docs/advanced/undo.mdx](file-pagesdocsadvancedundomdx.md): keywords: "crdt, undo, redo, undo manager, cursor, selection, collaborate" - [Undo](undo.md): We provide an`UndoManager`that helps you manage the undo/redo stack and can be - [FILE: pages/docs/advanced/version_deep_dive.mdx](file-pagesdocsadvancedversion-deep-divemdx.md): keywords: "crdt, version, frontier, DAG, git, history, time travel" - [Loro's Versioning Deep Dive: DAG, Frontiers, and Version Vectors](loros-versioning-deep-dive-dag-frontiers-and-version-vectors.md): In centralized environments, we can use linear version numbers to represent a - [FILE: pages/docs/tutorial/list.mdx](file-pagesdocstutoriallistmdx.md): keywords: "list crdt, movable list, move element, cursor, awareness" - [List and Movable List](list-and-movable-list.md): Loro supports two types of lists:`List`and`MovableList`. The`List`is a - [FILE: pages/docs/tutorial/encoding.mdx](file-pagesdocstutorialencodingmdx.md): keywords: "crdts, schema, encoding, persist, snapshot, gc" - [Export Mode](export-mode.md): Loro 1.0 has stabilized the data format and will not have any breaking - [FILE: pages/docs/tutorial/counter.mdx](file-pagesdocstutorialcountermdx.md): keywords: "counter crdt" - [Counter](counter.md): Loro's Counter will add up all the applied values, and supports integers and floating point numbers. - [FILE: pages/docs/tutorial/map.mdx](file-pagesdocstutorialmapmdx.md): keywords: "map crdt, last write win, key value, conflict" - [Map](map.md): Loro's Map uses LWW (Last-Write-Wins) semantics. When concurrent edits conflict, it compares Lamport logic timestamps... - [Getting Started with LoroDoc](getting-started-with-lorodoc.md): LoroDoc is the main entry point for almost all Loro functionality. It serves as a container manager and coordinator t... - [Event Handling in Loro](event-handling-in-loro.md): Loro implements an event system to track changes in the document. This section - [FILE: pages/docs/tutorial/cursor.mdx](file-pagesdocstutorialcursormdx.md): keywords: "cursor, crdts, multi-player, awareness, position, loro" - [Cursor](cursor.md): Cursor is an independently storable entity, meaning it can store content separately from the Loro document. It is use... - [FILE: pages/docs/tutorial/text.mdx](file-pagesdocstutorialtextmdx.md): keywords: "text crdt, richtext, richtext editor" - [Text](text.md): Loro supports both plain text and rich text. When rich text features (like mark - [FILE: pages/docs/tutorial/ephemeral.mdx](file-pagesdocstutorialephemeralmdx.md): keywords: "ephemeral, awareness, presence, collaborative" - [Ephemeral Store](ephemeral-store.md): In real-time collaborative scenarios, Presence information is just as important as maintaining document consistency a... - [FILE: pages/docs/tutorial/sync.mdx](file-pagesdocstutorialsyncmdx.md): Two documents with concurrent edits can be synchronized by just two message - [FILE: pages/docs/tutorial/time_travel.mdx](file-pagesdocstutorialtime-travelmdx.md): keywords: "crdt, time travel, history, checkout, version control" - [How to Use Time Travel in Loro](how-to-use-time-travel-in-loro.md): In Loro, you can call`doc.checkout(frontiers)`to jump to the version specified - [FILE: pages/docs/tutorial/composition.mdx](file-pagesdocstutorialcompositionmdx.md): keywords: "crdts, json, data model, document state, semantics" - [Composing CRDTs](composing-crdts.md): In Loro, you can build complex data structures using basic CRDTs such as List, MovableList, Map and Tree. These conta... - [Tips and Tricks](tips-and-tricks.md): If your document requires an initial state, you should not edit the document to achieve this state right - [FILE: pages/docs/tutorial/tree.mdx](file-pagesdocstutorialtreemdx.md): keywords: "tree crdt, move operation, fractional index, hierarchical, tree" - [Tree](tree.md): When it comes to utilizing hierarchical data structures and even performing operations across different levels of dat... - [FILE: pages/docs/tutorial/persistence.mdx](file-pagesdocstutorialpersistencemdx.md): The simplest approach is to use full snapshots for both import and export - [Version](version.md): In centralized environments, we can use linear version numbers to represent a version, such as incrementing a number ... - [FILE: pages/docs/tutorial/get_started.mdx](file-pagesdocstutorialget-startedmdx.md): keywords: "loro-crdt, build collaboration software, local-first, operation transform, crdts, ot" - [Getting Started](getting-started.md): You can use Loro in your application by using: - [Or](or.md): yarn add loro-crdt - [FILE: pages/docs/index.mdx](file-pagesdocsindexmdx.md): It is well-known that syncing data/building realtime collaborative apps is - [FILE: pages/docs/concepts/cursor_stable_positions.mdx](file-pagesdocsconceptscursor-stable-positionsmdx.md): keywords: "cursor, stable position, collaborative editing, CRDT, concurrent edits, selection, annotation, caret" - [Cursor and Stable Positions](cursor-and-stable-positions.md): **Cursors** maintain stable positions across concurrent edits by anchoring to operation IDs instead of indices. Essen... - [FILE: pages/docs/concepts/when_not_crdt.mdx](file-pagesdocsconceptswhen-not-crdtmdx.md): keywords: "crdt, limitations, constraints, business logic, invariants" - [When Not to Use CRDTs](when-not-to-use-crdts.md): CRDTs shine for collaborative editing and offline-friendly applications. - [Import Status](import-status.md): **Import status** tells you what operations were applied and what's pending due to missing dependencies. Essential fo... - [FILE: pages/docs/concepts/frontiers.mdx](file-pagesdocsconceptsfrontiersmdx.md): keywords: "frontiers, version, compact representation, DAG, CRDT" - [Frontiers](frontiers.md): Frontiers are a compact way to represent document versions in Loro by identifying the "frontier" operations - the mos... - [FILE: pages/docs/concepts/event_graph_walker.mdx](file-pagesdocsconceptsevent-graph-walkermdx.md): keywords: "crdt, event graph walker, eg-walker, synchronization, collaboration, algorithm, innovation" - [Event Graph Walker (Eg-Walker)](event-graph-walker-eg-walker.md): Event Graph Walker (Eg-Walker) is a revolutionary CRDT algorithm that fundamentally changes how collaborative editing... - [FILE: pages/docs/concepts/attached_detached.mdx](file-pagesdocsconceptsattached-detachedmdx.md): keywords: "attached, detached, state, container, document, version control" - [Attached vs Detached States](attached-vs-detached-states.md): Loro uses "attached/detached" in two distinct contexts: - [FILE: pages/docs/concepts/crdt.mdx](file-pagesdocsconceptscrdtmdx.md): import Image from "next/image"; - [What are CRDTs](what-are-crdts.md): CRDT (conflict-free replicated data type) is a data structure that can be - [What problems does CRDT solve?](what-problems-does-crdt-solve.md): For example, a scenario where multiple users edit the same document online at - [The Emergence of CRDTs](the-emergence-of-crdts.md): The formal concept of Conflict-free Replicated Data Types (CRDTs) was first - [A simple CRDT case](a-simple-crdt-case.md): We can use a few simple examples to get a general idea of how CRDTs achieve - [Introduction to the Principle](introduction-to-the-principle.md): There are two types of CRDTs: Op-based CRDTs and State-based CRDTs. This article - [Comparison of CRDT and OT](comparison-of-crdt-and-ot.md): Both CRDT and [Operation Transformation(OT)][ot] can be used in online - [Container](container.md): Containers are the fundamental building blocks in Loro for organizing and structuring collaborative data. They provid... - [Shallow Snapshots](shallow-snapshots.md): **Shallow snapshots** are like Git's shallow clone - maintain current state while removing old history. Essential for... - [FILE: pages/docs/concepts/oplog_docstate.mdx](file-pagesdocsconceptsoplog-docstatemdx.md): keywords: "crdt, oplog, snapshot, doc state, checkout, version, architecture, memory, performance" - [OpLog and DocState](oplog-and-docstate.md): - **OpLog** = Sequence of events/operations that compose the document history - [FILE: pages/docs/concepts/operations_changes.mdx](file-pagesdocsconceptsoperations-changesmdx.md) - [Operations and Changes](operations-and-changes.md): **Operations** are atomic edits. **Changes** are logical groups of operations with metadata. Understanding these help... - [PeerID Management](peerid-management.md): **Peer IDs** are unique identifiers for each editing session in Loro's distributed system. They ensure operation uniq... - [FILE: pages/docs/concepts/choose_crdt_type.mdx](file-pagesdocsconceptschoose-crdt-typemdx.md): keywords: "crdt, crdts, application, data model, concurrent, conflict" - [How to Choose the Right CRDT Types](how-to-choose-the-right-crdt-types.md): Choosing the right CRDT type means understanding their potential behavior in concurrent editing situations and judgin... - [FILE: pages/docs/concepts/version_vector.mdx](file-pagesdocsconceptsversion-vectormdx.md): keywords: "version vector, logical clock, distributed systems, CRDT, synchronization" - [Version Vector](version-vector.md): Version Vectors are a fundamental concept in distributed systems that track the complete state of all peers by record... - [Transaction Model](transaction-model.md): **Loro transactions are NOT database ACID transactions.** They are operation bundling mechanisms for event emission. - [FILE: pages/docs/api/js.mdx](file-pagesdocsapijsmdx.md): import styles from './api-reference.module.css' - [API Reference](api-reference.md): *Last updated: 2025-08-09 loro-crdt@1.5.10* - [LLM Resources](llm-resources.md): - [llms.txt](/llms.txt) - [FILE: pages/docs/performance/docsize.md](file-pagesdocsperformancedocsizemd.md): keywords: "loro, yjs, automerge, diamond-type, benchmark, document size, crdt" - [Document Size](document-size.md): In this benchmark, we use the Automerge paper dataset. - [Native Benchmarks](native-benchmarks.md): [This native benchmark](https://github.com/ is based on - [FILE: pages/docs/performance/index.md](file-pagesdocsperformanceindexmd.md): keywords: "loro, yjs, automerge, benchmark, memory, crdt" - [JS/WASM Benchmarks](jswasm-benchmarks.md): The primary role of these benchmarks should be to serve as indicators of the absence of performance pitfalls rather t... - [FILE: pages/blog/movable-tree.mdx](file-pagesblogmovable-treemdx.md): title: "Movable tree CRDTs and Loro's implementation" - [Movable tree CRDTs and Loro's implementation](movable-tree-crdts-and-loros-implementation.md): import Caption from "../../components/caption"; - [FILE: pages/blog/v1.0.mdx](file-pagesblogv10mdx.md): title: "Loro 1.0" - [Loro 1.0](loro-10.md): import Authors, { Author } from "../../components/authors"; - [FILE: pages/blog/loro-mirror.mdx](file-pagesblogloro-mirrormdx.md): title: "Loro Mirror: Make UI State Collaborative by Mirroring to CRDTs" - [Loro Mirror: Make UI State Collaborative by Mirroring to CRDTs](loro-mirror-make-ui-state-collaborative-by-mirroring-to-crdts.md): import Caption from "../../components/caption"; - [FILE: pages/blog/loro-now-open-source.mdx](file-pagesblogloro-now-open-sourcemdx.md): title: "Loro: Reimagine State Management with CRDTs" - [Loro: Reimagine State Management with CRDTs](loro-reimagine-state-management-with-crdts.md): import Caption from "../../components/caption"; - [FILE: pages/blog/loro-richtext.mdx](file-pagesblogloro-richtextmdx.md): title: "Introduction to Loro's Rich Text CRDT" - [Introduction to Loro's Rich Text CRDT](introduction-to-loros-rich-text-crdt.md): import Authors, { Author } from "../../components/authors"; - [FILE: pages/blog/crdt-richtext.mdx](file-pagesblogcrdt-richtextmdx.md): title: crdt-richtext - Rust implementation of Peritext and Fugue - [ogImage: /images/blog/joining-vercel/x-card.png](ogimage-imagesblogjoining-vercelx-cardpng.md) - [[crdt-richtext](https://github.com/loro-dev/crdt-richtext): Rust implementation of Peritext and Fugue](crdt-richtexthttpsgithubcomloro-devcrdt-richtext-rust-implementation-of-peritext.md): import Authors, { Author } from "../../components/authors"; - [What’s Peritext](whatâs-peritext.md): Peritext is a novel rich-text CRDT (Conflict-free Replicated Data Type) algorithm. It is capable of merging concurren... - [What’s Fugue](whatâs-fugue.md): Fugue is a new CRDT text algorithm, presented in _[The Art of the Fugue: Minimizing Interleaving in Collaborative Tex... - [CRDT-Richtext](crdt-richtext.md): Based on the algorithms of Peritext and Fugue, we made`crdt-richtext`, a lib written in Rust that provides a wasm in... - [Performance](performance.md): - Benchmark setup - [Discussion](discussion.md) - [About](about.md): Loro, created by [Zixuan Chen](http://github.com/ and - [Contact](contact.md): - Zixuan Chen, zx@loro.dev - [Credits](credits.md): - [Diamond-types](https://github.com/josephg/diamond-types): The ingenious OT-like merging algorithm from [@josephg](... - [FILE: node_modules/loro-crdt/nodejs/loro_wasm.d.ts](file-node-modulesloro-crdtnodejsloro-wasmdts.md): /* tslint:disable */