Skip to content

Migrate to stores package#7421

Draft
christianbaroni wants to merge 5 commits into
developfrom
@christian/stores-migration
Draft

Migrate to stores package#7421
christianbaroni wants to merge 5 commits into
developfrom
@christian/stores-migration

Conversation

@christianbaroni
Copy link
Copy Markdown
Member

@christianbaroni christianbaroni commented Apr 30, 2026

What changed (plus any additional context for devs)

  • Migrates all stores to @storesjs/stores and deletes the old internal state primitives
    • Almost all of the changes are updated imports and renames
    • Includes a one-time migration that runs before any store is loaded from persisted storage, which:
      • migrates off of the old ${key}:${key} storage key format, to simply key
      • resets all query store caches, to wipe legacy query keys built with useParsableQueryKeys: false
  • Makes the migrations that run under MIGRATIONS_STORAGE_ID lazy, so unneeded migration objects aren't built on every app launch
    • Moves the MMKV instance initialization in migrateExperimentalFlags to within the actual migration function, so it's not initialized when the most recent migration is checked within isFullyMigrated()

Screen recordings / screenshots

What to test

May replace this with a migration, but for now this ensures `queryCache` keys remain connected to their prior storage paths (the app's version of `createQueryStore` used the legacy key format)
@christianbaroni christianbaroni force-pushed the @christian/stores-migration branch from a21d4e3 to d12f609 Compare May 13, 2026 07:48
Separated from existing migrations so that this is guaranteed to run before any store is hydrated from persisted storage
@christianbaroni
Copy link
Copy Markdown
Member Author

/perf

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant