I just published react-native-smart-cache, a lightweight yet powerful caching library for React Native. π
π What it does:
β
Cache API data, JSON, images, and media
β
Supports multiple storage backends (Memory, AsyncStorage, FileSystem)
β
Built-in TTL (time-to-live) for auto-expiry
β
Hooks like useCached and useCachedFetchJSON to simplify data fetching
β
Image caching with useCachedImage (no more redownloading avatars π)
β
Namespace support + easy cache invalidation
π‘ Why I built this:
In most RN projects, caching is a recurring challengeβ-βdevelopers either write boilerplate logic or use multiple libraries for APIs, AsyncStorage, and images.
With react-native-smart-cache, I wanted to provide a single, consistent solution that's easy to integrate and powerful enough for real-world apps (offline-first, e-commerce, social, etc.).
π¦ NPM: react-native-smart-cache
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)