WatermelonDB is a new way of dealing with user data in React Native and React web apps. It's optimized for building complex applications in React / React Native, and the number one goal is real-world performance.
WatermelonDB is a reactive & asynchronous database designed for powerful React and React Native apps. It is optimized for building complex applications, with its primary goal being real-world performance.
Features:
Instant Launch: WatermelonDB is engineered to launch your app instantly regardless of the amount of data it holds.
High Scalability: It is highly scalable, capable of handling systems ranging from hundreds up to tens of thousands of records.
Fast Operations: The tool is designed to be fast, with ongoing performance improvements in every release.
Lazy Loading: WatermelonDB resolves performance bottlenecks (especially when scaling to thousands of records) by being lazy. Nothing is loaded until it’s requested.
SQLite Foundation: It is built on a rock-solid SQLite foundation. All querying is performed directly on the SQLite database on a separate native thread, ensuring that most queries resolve instantly.
Relational Structure: The database is Relational. Developers can define models (like Post and Comment) and relationships using decorators.
Offline-First: It supports an Offline-first approach, with functionality to sync data with your custom backend.
Fully Observable: Unlike using SQLite directly, WatermelonDB is fully observable.
Automatic Re-rendering: It is Reactive (offering an optional RxJS API). When a record is changed, added, or removed (even in a different part of the application), all dependent UI components will automatically re-render.
React Optimization: It is Optimized for React, allowing users to easily plug data into components.
Multiplatform: WatermelonDB is Multiplatform, supporting iOS, Android, Windows, web, and Node.js.
Framework-Agnostic: While optimized for React, it is Framework-agnostic, meaning its JavaScript API can be used to plug into other UI frameworks.
Static Typing: It supports Static typing via Flow or TypeScript.
Open Source: WatermelonDB is an open-source project that encourages contribution. It is available under the MIT license.