// Client state — Zustand// Do not persist bearer or refresh tokens in AsyncStorage/plain MMKV.// Store secrets with a platform-backed module such as react-native-keychain// or expo-secure-store, and persist only non-sensitive UI state here.interfaceAuthState{isLoggedIn:boolean;setLoggedIn:(value:boolean)=>void;logout:()=>void;}exportconstuseAuthStore=create<AuthState>()(persist((set)=>({isLoggedIn:false,setLoggedIn:(value)=>set({isLoggedIn:value}),logout:()=>set({isLoggedIn:false}),}),{name:'auth-ui-storage',storage:createJSONStorage(()=>mmkvStorage)}));// Keep tokens outside persisted app state.constgetSecureToken=()=>Keychain.getGenericPassword().then((r)=>(r?r.password:null));constsaveSecureToken=(token:string)=>Keychain.setGenericPassword('auth',token);constclearSecureToken=()=>Keychain.resetGenericPassword();// Server state — React QueryexportconstuseItems=()=>useQuery({queryKey:['items'],queryFn:itemsApi.getAll,staleTime:5*60*1000,// 5 minutes});exportconstuseRefreshItems=()=>useMutation({mutationFn:itemsApi.refresh,onSuccess:()=>queryClient.invalidateQueries({queryKey:['items']}),});
G-Helper:三步切换华硕笔记本性能模式与电池充电上限,免费轻量 Armoury Crate 替代 【免费下载链接】g-helper Lightweight Armoury Crate alternative for Asus laptops with nearly the same functionality. Works with ROG Zephyrus, Flow, TUF, Stri…
【免费下载链接】claude-seo Universal SEO skill for Claude Code. 26 sub-skills 19 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, agent readiness (Lighthouse Agentic Browsing, WebMCP, llms.txt), backlinks, local SEO, e-commerce, international …