cant get value back from SecureStorage

#1

My code below won’t run the if statement, only the else.

SecureStore.getItemAsync('notFirstLaunch').then((value) => {
      LaunchApp(value);
    });

    const LaunchApp = function (value) {
      console.log(value);
      if (value === "true") {
        return (
          <SafeAreaView forceInset={{ bottom: 0 }} style={{ flex: 1, backgroundColor: '#E65100' }}>
              <Main />
          </SafeAreaView>
        );
      }
      else {
        SecureStore.setItemAsync('notFirstLaunch', "true");
          return (
              <Walkthrough />
          ); 
      }
  };

my console.log returns value = true but my if statement never runs only the else, please help!

closed #2

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.