Implement an offline caching mechanism in Movies.jsx to allow users to access previously loaded movie data even when they are offline.
This will enhance performance and reliability, especially in low or unstable network conditions.
🎯 Goals / Acceptance Criteria
Integrate IndexedDB (via the idb
library) for offline data storage.
Cache movie data fetched from the API (e.g., title, poster, description).
When offline, display movies from the cached IndexedDB data.
Ensure the cache updates when new data is fetched online.
Add a simple UI indicator or message when the app is working in offline mode.