TinyBase
state
A tiny, dependency-free, reactive data store and synchronization engine for JavaScript applications. It provides granular subscriptions so UIs only re-render when relevant data changes, keeping apps fast and predictable.Data can be modeled as simple key-value pairs or as tabular structures with rows and cells. Built-in capabilities include schemas with defaults and type inference, indexes for fast lookups, metrics for aggregations, relationships between tables, an undo/redo checkpoint system, and a SQL-adjacent query engine (TinyQL) for selecting, joining, filtering, and grouping—reactively.Designed for local-first and offline-first workflows, it offers native CRDT support via MergeableStore to synchronize and deterministically merge data across clients and servers. Persistence is available to browser storage and IndexedDB, as well as databases like SQLite and PostgreSQL, plus integrations with Yjs and Automerge.Optional React bindings include hooks and lightweight UI components for building fully reactive interfaces, along with an in-app Inspector to view and edit store data live during development. Despite its breadth, the core remains small (around 5.3kB–11.7kB gzipped), fully documented, and rigorously tested.
Features
- Reactive in-memory data store
- Key-value and tabular data models
- Granular listeners and subscriptions
- TinyQL query engine (select/join/filter/group)
- Indexes for fast lookups
- Metrics and aggregations
- Table relationships
- Schemas with defaults and type inference
- Checkpoints with undo/redo
- Native CRDT MergeableStore
- Synchronization over WebSockets, BroadcastChannel, and custom transports
- Persistence to browser storage and IndexedDB
- Database persistence for SQLite and PostgreSQL (and variants like Bun/Expo SQLite)
- Integrations with Yjs, Automerge, CR-SQLite, PGlite, ElectricSQL, Turso, PartyKit, Cloudflare Durable Objects
- Optional React hooks and prebuilt components (ui-react, ui-react-dom)
- In-app data Inspector devtool
- Local-first and offline-friendly design
- Tiny bundle size with zero dependencies
- 100% test coverage and extensive docs
Links
Stats
GitHub Stars4.7K
NPM Downloads22.1K/week
Details
Latest Version6.5.2
Created at12/31/2021
Updated at8/16/2025
LicenseMIT License
Related Items
Legend State
This powerful library streamlines state management in your applications, making complex data handling a breeze.
MobX
This state management solution enables seamless integration of dynamic data in your applications, adapting to changes effortlessly.
Redux Toolkit
A comprehensive toolkit designed to streamline and enhance the Redux development process, ensuring that applications are predictable and maintainable.
valtio
This library simplifies proxy-based state management for modern applications, enhancing the development experience with efficient rendering and easy state manipulation.
Jotai
A powerful yet lightweight state management solution that adopts an atomic approach for managing state in React applications.
MobX-State-Tree
A full-featured library that simplifies state management by providing a structured approach to mutable state handling.
TanStack Router
A modern and scalable routing library designed specifically for React, specializing in type safety and efficient data management.
zustand
A modern solution for managing application state in React apps with a focus on simplicity and performance.
About KickstartUI
KickstartUI is your ultimate destination for discovering the best UI frameworks, libraries, and build tools. We meticulously curate top-notch resources to empower developers in bringing their UI ideas to life. Whether you're building a responsive web app, crafting a mobile interface, or designing an interactive prototype, our platform offers the essential tools to accelerate your projects and enhance user experiences. Explore our extensive collection to stay ahead of the latest trends, unlock new possibilities, and elevate your UI designs. Ready to kickstart your next project? Dive into our featured resources or search for specific tools tailored to your needs.