Hello, I use react-native 0.20.0 and latest realm-js.
Everytime I change schema, iOS simulator failed execute because migration error.
I saw (solution)[https://github.com/realm/realm-js/issues/169] but is there any other solution?
When changing your schema you need to pass in a new schemaVersion the next time you open the Realm. This is documented here: https://realm.io/docs/react-native/latest/#schema-version
Thank you @alazier. additional question. How can I reset realm database?
You can delete all objects in a database with this method:
https://realm.io/docs/react-native/latest/api/Realm.html#deleteAll
Thank you @alazier
I found that we must give realm config to all codes that like this:
Realm.open()
I thought it must be used only in new realm but we must use our new realm config in all Realm.open
Most helpful comment
You can delete all objects in a database with this method:
https://realm.io/docs/react-native/latest/api/Realm.html#deleteAll