docs: Add TanStack Query state management documentation (#9047)

This commit is contained in:
Xingyao Wang 2025-06-10 16:44:00 -04:00 committed by GitHub
parent 5d328183d5
commit 73f01657eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,6 +44,11 @@ Frontend:
- Available variables: VITE_BACKEND_HOST, VITE_USE_TLS, VITE_INSECURE_SKIP_VERIFY, VITE_FRONTEND_PORT
- Internationalization:
- Generate i18n declaration file: `npm run make-i18n`
- State Management:
- We use TanStack Query (React Query) for server state management
- Custom hooks are located in `frontend/src/hooks/query/` and `frontend/src/hooks/mutation/`
- Query hooks should follow the pattern `use[Resource]` (e.g., `useConversationMicroagents`)
- Mutation hooks should follow the pattern `use[Action]` (e.g., `useDeleteConversation`)
## Template for Github Pull Request