Search code examples
react-nativerealm-mobile-platform

How to delete a table (class in schema) in the domain database is not reaction native?


Good afternoon, all right ?, I am new non-native to reactive and am having to use Database, non-native territory to reagent but wanted to know if it was deleted as table (Schema class already created). Thank you very much in advance.

versions
"react": "16.8.6",
"react-native": "0.60.5",
"realm": "^3.2.0",

Solution

  • 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
    

    Realm for React-native. reset database