# legendapp/legend-state

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/legendapp-legend-state).**

4,145 stars · 140 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/LegendApp/legend-state
- Homepage: https://legendapp.com/open-source/state/
- awesome-repositories: https://awesome-repositories.com/repository/legendapp-legend-state.md

## Description

Legend-State is a reactive state management library for JavaScript applications that provides a centralized container for application data. It utilizes a fine-grained reactivity engine to track state access automatically, allowing developers to update and retrieve data without the need for boilerplate patterns like reducers, actions, or dispatchers.

The library distinguishes itself through its hierarchical, path-based state addressing and proxy-based dependency tracking. By isolating state dependencies, it ensures that user interface updates are triggered only for the specific components that consume modified data, rather than re-rendering entire object trees. This approach extends to list rendering and nested data, where updates are isolated to the smallest possible units to maintain performance.

Beyond core state management, the system includes built-in support for offline-first functionality and data synchronization. It features automatic persistence middleware that handles local storage and remote backend synchronization, including optimistic updates and minimal data diffing. The framework also provides utilities for securing sensitive information through client-side encryption and offers a unified interface for managing data across local and remote sources.

## Tags

### Data & Databases

- [Application State Management](https://awesome-repositories.com/f/data-databases/application-state-management.md) — Provides a centralized container for application data that eliminates the need for complex boilerplate patterns. ([source](https://github.com/legendapp/legend-state#readme))
- [Application State Syncs](https://awesome-repositories.com/f/data-databases/cloud-storage-sync-tools/application-state-syncs.md) — Updates remote backends with local data changes using optimistic updates and minimal data diffing. ([source](https://github.com/legendapp/legend-state#readme))
- [Cross-Device State Synchronization](https://awesome-repositories.com/f/data-databases/cross-device-state-synchronization.md) — Maintains consistent application state across multiple user devices and shared workspaces. ([source](https://legendapp.com/))
- [Source Connection Sync Triggers](https://awesome-repositories.com/f/data-databases/data-synchronization-configurations/cloud-storage-sync-triggers/source-connection-sync-triggers.md) — Provides a unified interface for synchronizing local state with remote backends and persistent storage. ([source](https://www.legendapp.com/open-source/state/))
- [Automatic State Persistence](https://awesome-repositories.com/f/data-databases/in-memory-databases-with-persistence/automatic-state-persistence.md) — Automatically persists application state to local storage to ensure consistency across sessions.
- [Local Persistence](https://awesome-repositories.com/f/data-databases/local-persistence.md) — Provides a framework for automatic local persistence and remote synchronization to support offline-first applications.
- [Offline-First Persistence](https://awesome-repositories.com/f/data-databases/offline-first-persistence.md) — Supports reliable offline-first functionality by automatically synchronizing local data with remote backends.
- [Persistent Application State](https://awesome-repositories.com/f/data-databases/persistent-application-state.md) — Saves application data to local storage automatically to ensure state consistency across sessions. ([source](https://github.com/legendapp/legend-state#readme))
- [Real-Time Data Synchronizers](https://awesome-repositories.com/f/data-databases/real-time-data-synchronizers.md) — Synchronizes information in real time across multiple devices and collaborators. ([source](https://www.legendapp.com/))

### User Interface & Experience

- [Reactive State Management Libraries](https://awesome-repositories.com/f/user-interface-experience/reactive-state-management-libraries.md) — A high-performance reactive state management library that uses fine-grained reactivity to minimize component re-renders.
- [Fine-Grained Reactivity](https://awesome-repositories.com/f/user-interface-experience/fine-grained-reactivity.md) — Triggers UI updates only for the smallest possible units by subscribing components directly to individual state nodes.
- [Proxy-Based Reactivity](https://awesome-repositories.com/f/user-interface-experience/ui-architecture/reactivity-systems/proxy-based-reactivity.md) — Uses JavaScript proxies to intercept data access and mutations, automatically mapping state nodes to consuming components.
- [List Rendering](https://awesome-repositories.com/f/user-interface-experience/layout-utilities/presentation-engines/list-rendering.md) — Updates individual array items in place to avoid re-rendering entire list containers. ([source](https://www.legendapp.com/open-source/state/v3/intro/fast/))
- [Automatic Dependency Tracking](https://awesome-repositories.com/f/user-interface-experience/ui-architecture/reactivity-systems/automatic-dependency-tracking/automatic-dependency-tracking.md) — Updates user interfaces automatically by tracking reactive data dependencies during execution. ([source](https://legendapp.com/open-source/state/))
- [Update Batching](https://awesome-repositories.com/f/user-interface-experience/update-batching.md) — Groups multiple state mutations into single execution cycles to optimize performance during rapid data changes.

### Software Engineering & Architecture

- [State Containers](https://awesome-repositories.com/f/software-engineering-architecture/state-containers.md) — Acts as a centralized JavaScript state container that tracks access automatically without complex dispatchers.
- [State Functionality Extenders](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/state-logic-and-utilities/functional-state-management/state-functionality-extenders.md) — Provides pre-built hooks and utilities to manage UI interactions, routing, and data transformations. ([source](https://www.legendapp.com/open-source/state/))
- [UI State Change Tracking](https://awesome-repositories.com/f/software-engineering-architecture/component-change-tracking/ui-state-change-tracking.md) — Tracks data access automatically to trigger targeted UI updates only when specific values change. ([source](https://www.legendapp.com/open-source/state/))
- [State Dependency Isolators](https://awesome-repositories.com/f/software-engineering-architecture/dependency-state-management/state-dependency-scoping/state-dependency-isolators.md) — Isolates nested state dependencies to ensure parent components do not re-render when unrelated data changes. ([source](https://www.legendapp.com/open-source/state/v3/intro/fast/))
- [Path-Based State Addressing](https://awesome-repositories.com/f/software-engineering-architecture/state-change-observers/path-based-state-observers/path-based-state-addressing.md) — Organizes application data into a hierarchical tree structure where every node is uniquely addressable for granular observation.

### Web Development

- [Reactive State Management](https://awesome-repositories.com/f/web-development/reactive-state-management.md) — Provides a reactive state management system that eliminates boilerplate patterns like reducers and actions.
- [Component-Based Renderers](https://awesome-repositories.com/f/web-development/html-rendering/component-based-renderers.md) — Optimizes rendering by tracking state changes at a granular level to trigger updates only for consuming components. ([source](https://github.com/legendapp/legend-state#readme))
- [Component Update Optimizations](https://awesome-repositories.com/f/web-development/performance-optimizations/component-update-optimizations.md) — Optimizes component performance by isolating child components to prevent unnecessary parent re-renders. ([source](https://www.legendapp.com/open-source/state/v3/intro/why/))
- [Persistence Middleware](https://awesome-repositories.com/f/web-development/state-management-middleware/persistence-middleware.md) — Intercepts state changes to automatically synchronize data with local or remote storage providers without manual logic.
- [Optimistic Updates](https://awesome-repositories.com/f/web-development/state-management/optimistic-updates.md) — Applies local updates immediately to the user interface while managing background network requests for eventual consistency.

### Graphics & Multimedia

- [UI Component Rendering](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/dom-web-rendering-strategies/ui-component-rendering.md) — Minimizes UI re-renders by updating only the specific components that depend on changed data. ([source](https://www.legendapp.com/open-source/state/v3/intro/why/))

### Security & Cryptography

- [Sensitive Data Protection](https://awesome-repositories.com/f/security-cryptography/sensitive-variable-redaction/sensitive-data-protection.md) — Protects sensitive information using client-side encryption before storage or transmission. ([source](https://www.legendapp.com/))

### System Administration & Monitoring

- [Remote Data Synchronization](https://awesome-repositories.com/f/system-administration-monitoring/remote-data-synchronization.md) — Synchronizes local data automatically with remote backends without requiring manual query or mutation logic. ([source](https://legendapp.com/open-source/state/))
