It is working as well without debugger mode. But on debugger mode, I am getting error when try to create Realm object with schema parameters.
import Realm from 'realm';
class Todo extends Realm.Object {}
Todo.schema = {
name: 'Todo',
properties: {
done: {type: 'bool', default: false},
text: 'string',
},
};
class TodoList extends Realm.Object {}
TodoList.schema = {
name: 'TodoList',
properties: {
name: 'string',
creationDate: 'date',
items: {type: 'list', objectType: 'Todo'},
},
};
export default new Realm({schema: [Todo, TodoList]});
Realm JS SDK Version: 2.17.0 React Native: 0.57.1
constructor must be of type 'function', got (undefined)
This error only appears in version 2.18.0
(latest) try downgrading to the version before 2.16.0
To downgrade the realm package
npm uninstall realm
npm install --save [email protected]
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