Answer the question
In order to leave comments, you need to log in
Returns undefined RealmJS on React Native?
Hello. Now I'm developing an Android application, using React Native, using Realm for data storage.
For convenience, I created a class that should work with a certain data type in Realm, and there I created a method to get all the data from the Database, here it is:
getFiles = () => {
Realm.open({schema: [this.file]})
.then( realm => {
let file = realm.objects('file')
realm.close();
return file
}).catch(error => {
console.log(error);
})
}
let filesRealm = RealmFile.files;
console.log(filesRealm)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question