text: import { AsyncStorage } from "react-native";
  
  export const USER_KEY = "auth-demo-key";
  
  export const onSignIn = () => AsyncStorage.setItem(USER_KEY, "true");
  
  export const onSignOut = () => AsyncStorage.removeItem(USER_KEY);
  
  export const isSignedIn = () => {
    return new Promise((resolve, reject) => {
      AsyncStorage.getItem(USER_KEY)
        .then(res => {
          if (res !== null) {
            return resolve(true);
          } else {
            return resolve(false);
          }
        })
        .catch(err => reject(err));
    });
  };
  