android - React-natives AsyncStorage does not work -


i trying call function includes asyncstorage-calls (receives , stores data 'tutorialnotover'). program worked while ago somehow got broken. react-native not give me warnings or errors, don't work right. looks program skips call of getfirsttime()-function.

<view> ... {this.props.firsttime = this.getfirsttime} ... </view>  ...  async getfirsttime(){     let firsttime = "null";      try{         firsttime = await asyncstorage.getitem('tutorialnotover', (err, result) => {             console.log("getfirsttimefirsttime: " + result);         });     }     catch (error){       console.log(error);     }      if (firsttime === 'null')     {       firsttime = 'true';     }       if (firsttime === "true")     {       try{        asyncstorage.setitem('tutorialnotover', "true");        return true;      }      catch (error){        console.log(error);      }    }    return false;  } 


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -