Skip to content

perf: migrate AsyncStorage usage to react-native-mmkv #44

Description

@ryanshepps

Summary

Migrate IronLog's local persistence from @react-native-async-storage/async-storage to react-native-mmkv (https://github.com/mrousavy/react-native-mmkv) so client-side reads and writes use the faster native key-value store.

Current AsyncStorage usage is concentrated in client/lib/storage.ts, client/lib/write-queue.ts, and client/lib/supabase.ts, with docs still describing AsyncStorage-backed caching. The migration should preserve the app's offline-first behavior: active workout writes must remain durable before remote sync attempts, queued remote writes must survive restarts, and Supabase auth persistence must continue to work through the storage interface it expects.

Acceptance Criteria

  • Does every app-side AsyncStorage import and usage move to react-native-mmkv or an MMKV-backed adapter?
  • Does auth, active workout persistence, favorites/preferences caching, and the write queue still survive app restarts?
  • Is any existing AsyncStorage data migrated or intentionally handled so users do not silently lose active workout, queue, or auth state?
  • Are dependencies and docs updated so @react-native-async-storage/async-storage is no longer presented as the local persistence layer?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions