How to prevent multi beginTransactions in Realmjs?
  
 
     
     
             
                 
 
 
         
         1 
         
 
         
             
         
 
 
 
 
             
 
             
 
     
     
 
 I create a function to handle transaction, then I call it to multi places. I got crash when another transaction not yet complete when I open new transaction.   Here my code:    const RealmMakeTransaction = async (action) => {      try {          realm.GetInstance().beginTransaction();          let response = await action();          realm.GetInstance().commitTransaction();           return response;       } catch (e) {           realm.GetInstance().cancelTransaction();      }  };       
 
         
             
                 react-native realm-js 
             
         
 
     
         
             
  share | improve this question  
             
 
             
 
     
         asked 7 hours ago 
     
     
         
     
     
         Mengheang Mengheang 
         
             16 4 
         
    ...