react-phone-apps/.blueprint/modules/state-management.md
lanrtop a0929de768 chore: 初始化项目结构与蓝图
- 配置 pnpm workspace monorepo 基础结构
- 初始化 .blueprint/ 蓝图:6 个业务模块、21 张任务卡
- 目标:Z Fold 6 折叠屏不动产物品摸底统计 App(React Native + Expo)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 15:23:39 +09:00

29 lines
849 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: state-management
name: 全局状态管理
area: frontend
status: concept
---
## 概述
跨组件的全局状态方案覆盖用户会话、UI 状态等场景。轻量优先Zustand避免过度设计。
## 任务卡
### 💭 用户会话 Store
- status: concept
- complexity: M
- files: apps/app-one/src/stores/authStore.ts
- acceptance: 使用 Zustand 管理 user/token/isLoggedIn提供 login/logout actiontoken 持久化到 localStorage
### 💭 全局 UI 状态 Store
- status: concept
- complexity: S
- files: apps/app-one/src/stores/uiStore.ts
- acceptance: 管理全局 loading、toast 消息队列、modal 开关状态,与 packages/ui 的反馈组件联动
## 决策记录
- 选择 Zustand 而非 Redux移动端场景状态相对简单Zustand API 更轻量,无需 boilerplateTypeScript 支持良好