-
-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I initially chose Realm as the database persistence layer because it was the easiest to configure at the time.
Additionally, at the time, React Native was going through the transition to the new architecture, and I couldn't find any React Native SQLite libraries that appeared to have been updated to support the transition.
But now, Realm is no longer supported and will be removed in September 2025, so I have to find another solution.
Fortunately, some new SQLite libraries have been published in the meantime, so I can consider switching to one of them:
- Nitro SQLite: https://github.com/margelo/react-native-nitro-sqlite
- OP-SQLite: https://github.com/OP-Engineering/op-sqlite
Personally, I'm leaning towards Nitro SQLite because it appears to have a nicer integration with TypeORM which I'm also leaning towards as the replacement for Realm's schema layer.
The switch will also have to consider data migration for existing users. Since Realm won't be available forever, I will probably have to host a service that can receive a Realm database and convert it to the latest SQLite schema version (or at least export to STIF format to be re-imported locally on-device).