From 24971a9512b5ffc7821fa9d688b44b92b38fd6ab Mon Sep 17 00:00:00 2001 From: Yusuf Tomilola <52901501+yusuftomilola@users.noreply.github.com> Date: Fri, 29 May 2026 20:08:29 +0100 Subject: [PATCH] docs: add stores README documenting the Zustand pattern --- mobile/stores/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mobile/stores/README.md diff --git a/mobile/stores/README.md b/mobile/stores/README.md new file mode 100644 index 0000000..bce20eb --- /dev/null +++ b/mobile/stores/README.md @@ -0,0 +1,19 @@ +# Stores + +Zustand stores for global state management across the mobile app. + +## Pattern + +Each store is created with `create()` from `zustand`. Stores that need cross-session +persistence use the `persist` middleware backed by `AsyncStorage`. All stores are +re-exported from `index.ts` so components import from a single path: +`import { useWalletStore } from '@/stores'`. + +## Available Stores + +| Export | File | Purpose | +|---|---|---| +| `useWalletStore` | `walletStore.ts` | Wallet address and connection state | +| `useGroupsStore` | `groupsStore.ts` | Cached groups list with loading state | +| `useUserStore` | `userStore.ts` | Authenticated user profile | +| `useGroupStore` | `useGroupStore.ts` | Active group context |