A local storage wrapper for React Native and web apps with size control, auto-expiring, remote data syncing, and batch queries.
React Native Storage is a local storage wrapper library that provides a unified API for managing persistent data in both React Native and web applications. It solves the problem of handling offline data with features like automatic expiration, size management, and remote data synchronization, ensuring consistent data access across platforms.
React Native and web developers who need a robust solution for local data storage with advanced features like expiration control and automatic syncing with remote data sources.
Developers choose React Native Storage for its cross-platform compatibility, promise-based async API, and built-in features like size control and auto-expiring data, which reduce boilerplate code and simplify complex storage scenarios compared to using raw AsyncStorage or localStorage directly.
local storage wrapper for both react-native and browser. Support size controlling, auto expiring, remote data auto syncing and getting batch data in one query.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a unified API for React Native (using AsyncStorage) and web (using localStorage), simplifying code across platforms and reducing platform-specific logic.
Configurable expiration times via expires or defaultExpires automatically handle stale data, reducing manual cleanup and ensuring fresh data access.
Custom sync methods can be defined to fetch data when local storage is empty or expired, supporting offline-first apps with seamless background updates.
Functions like getBatchData and getBatchDataWithIds allow loading multiple items in one call, optimizing performance by reducing async operations.
The README explicitly recommends TanStack Query for a 'cleaner, more elegant' approach, indicating this library may be legacy or less maintained for modern use cases.
Prohibits underscores in keys and ids, which can conflict with common naming conventions and require data transformation or adherence to strict rules.
Separates 'key-only' and 'key-id' data, with functions like clearMapForKey not affecting key-only data, leading to potential confusion and inconsistent data management.