From 73f01657eb947fb3fd3451476c940b954d85872b Mon Sep 17 00:00:00 2001 From: Xingyao Wang Date: Tue, 10 Jun 2025 16:44:00 -0400 Subject: [PATCH] docs: Add TanStack Query state management documentation (#9047) --- .openhands/microagents/repo.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.openhands/microagents/repo.md b/.openhands/microagents/repo.md index 655514d6a6..e8095b2f17 100644 --- a/.openhands/microagents/repo.md +++ b/.openhands/microagents/repo.md @@ -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