首页 > 解决方案 > javascript ream.close() not closing, stopped

问题描述

I am using Realm Database to store data for page navigation in my react native application.The below method stops working after I invoke realm.close()

Can you please suggest me what might be the issue.

export const getStorageProtags =  () => {
  return Realm.open({
  schema: [ProtagsSchema]
  }).then(realm => {
    const protags = realm.objects('Protags');
    realm.close();
    return protags[0]; 
 });
}

标签: realmrealm-mobile-platform

解决方案


推荐阅读