feat: add xstate state management for user state
Introduce xstate v5 and @xstate/react to manage user authentication and profile state. Implement userMachine with actors for initialization, fetching, and logout operations, along with actions for updating user data and clearing state.
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
* - `recordXxx(today)` 写入 todayString,后续 `canXxx` 在同一天返回 `false`。
|
||||
*/
|
||||
|
||||
import { LocalStorage } from "../local_storage";
|
||||
import { Result, type Result as ResultT } from "@/utils/result";
|
||||
import { StorageKeys } from "../storage_keys";
|
||||
import { LocalStorage } from "@/utils/local-storage";
|
||||
|
||||
export class AppStorage {
|
||||
private static _ls: LocalStorage | null = null;
|
||||
|
||||
Reference in New Issue
Block a user