美文网首页
realm RN 的几个bug

realm RN 的几个bug

作者: 以德扶人 | 来源:发表于2018-10-26 17:11 被阅读39次

Cannot access realm that has been closed
索引的realm对象需要转换:
message = this.delcommontChat(message);
convertToArray(realmObjectsArray){
let copyOfJsonArray = Array.from(realmObjectsArray);
let jsonArray = JSON.parse(JSON.stringify(copyOfJsonArray));
return jsonArray;
}

realm at path already opened on current thread with different schema
调用完数据库需要进行关闭,才能在另一个地方调用另一个数据库
realm.close();

相关文章

网友评论

      本文标题:realm RN 的几个bug

      本文链接:https://www.haomeiwen.com/subject/jjdltqtx.html