The app uses bare useEffect + useState for all data fetching, leading to duplicated fetches and no caching.\n\nInstall @tanstack/react-query. Replace all useEffect data fetching in escrow pages and history with React Query hooks. 30-second stale time for contract state.\n\nAcceptance Criteria: Navigating away and back to the escrow dashboard does not trigger a new network request if data is < 30s old.\n\nFiles: app/layout.tsx (Modify — add QueryClientProvider), hooks/useContractState.ts (Modify), hooks/useTransactionHistory.ts (Create)
The app uses bare useEffect + useState for all data fetching, leading to duplicated fetches and no caching.\n\nInstall @tanstack/react-query. Replace all useEffect data fetching in escrow pages and history with React Query hooks. 30-second stale time for contract state.\n\nAcceptance Criteria: Navigating away and back to the escrow dashboard does not trigger a new network request if data is < 30s old.\n\nFiles: app/layout.tsx (Modify — add QueryClientProvider), hooks/useContractState.ts (Modify), hooks/useTransactionHistory.ts (Create)