I'am new in realm with react-native.
I change schema often, but get migration error everytime I change.
How do I reset realm database when I change schema?
You can just delete the app from the device or the simulator to reset the Realm.
Using Android Emulator Genymotion
In your app
const realm = await getRealm();
console.log(realm.path);
copy the result from console.log () which will be the path of your .realm file.
In (Cmd or Terminal)
adb shell rm /data/data/com.example.package/files/default.realm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With