Ecosystem
Storage during a React Native to KMP migration
Choose a Kotlin storage API and preserve preferences, local data and sessions across app upgrades.
On this page
Match the kind of data#
| Data | Kotlin option | What to preserve |
|---|---|---|
| Preferences in AsyncStorage | Multiplatform Settings or DataStore Preferences | Keys, defaults and absent values. |
| Structured records | Room for Kotlin Multiplatform | Schema, IDs, transactions and migrations. |
| Tokens and other secrets | The existing secure store during coexistence, with a platform-appropriate secure store at cutover | Session continuity and platform access controls. |
Move data in a separate step#
Keep one owner for writes while both UIs can run. Pass the values into Compose or export operations from Kotlin once the Kotlin side owns them. Check the original file format and location on each platform before moving existing data. Design a migration that can retry safely and only marks records as migrated after the target write succeeds.
Test with the previous app installed and populated. Verify that upgrading preserves preferences and the signed-in session. If the React Native screen is still a rollback option, exercise it after the Compose screen writes data. State management · Removing React Native