Loading...
Loading...
Compare original and translation side by side
| 文件 | 描述 | 主要內容 |
|---|---|---|
| race-condition.md | 競態條件處理 | AbortController、Boolean Flag、TanStack Query |
| search-system.md | 搜尋系統實作 | 自動完成、輸入法優化、防護機制 |
| pagination-system.md | 分頁系統實作 | 快取策略、異常處理、效能優化 |
| infinite-scroll.md | 動態加載與無限捲動 | Intersection Observer、位置保存 |
| intersection-observer.md | Intersection Observer API | 懶加載、動畫觸發、廣告追蹤 |
| crud-sync.md | 列表資料 CRUD 同步 | 同步策略、狀態管理整合 |
| state-management.md | 狀態管理選擇指南 | 決策樹、工具對比、最佳實踐 |
| refresh-token-race-condition.md | Refresh Token 與競態條件 | 無感刷新、Axios攔截器、TanStack Query/SWR整合 |
| File | Description | Main Content |
|---|---|---|
| race-condition.md | Race Condition Handling | AbortController, Boolean Flag, TanStack Query |
| search-system.md | Search System Implementation | Autocomplete, IME Optimization, Protection Mechanisms |
| pagination-system.md | Pagination System Implementation | Caching Strategies, Exception Handling, Performance Optimization |
| infinite-scroll.md | Dynamic Loading & Infinite Scrolling | Intersection Observer, Position Saving |
| intersection-observer.md | Intersection Observer API | Lazy Loading, Animation Triggering, Ad Tracking |
| crud-sync.md | List Data CRUD Synchronization | Synchronization Strategies, State Management Integration |
| state-management.md | State Management Selection Guide | Decision Tree, Tool Comparison, Best Practices |
| refresh-token-race-condition.md | Refresh Token & Race Conditions | Seamless Refresh, Axios Interceptors, TanStack Query/SWR Integration |
| 專案規模 | 推薦組合 | 理由 |
|---|---|---|
| 小型(< 10 頁) | URL + useState + Context | 輕量、快速開發、零依賴 |
| 中型(10-30 頁) | TanStack Query + URL + Zustand/Jotai | 平衡功能與複雜度 |
| 大型(> 30 頁) | TanStack Query + URL + Redux Toolkit | 完整生態、團隊規範 |
| 高性能要求 | TanStack Query + Zustand | 極簡 API、最高效能 |
| 複雜狀態依賴 | TanStack Query + Jotai | 原子化細粒度控制、自動優化 |
| Project Scale | Recommended Combination | Reason |
|---|---|---|
| Small (<10 pages) | URL + useState + Context | Lightweight, fast development, zero dependencies |
| Medium (10-30 pages) | TanStack Query + URL + Zustand/Jotai | Balances functionality and complexity |
| Large (>30 pages) | TanStack Query + URL + Redux Toolkit | Complete ecosystem, team standards |
| High Performance Needs | TanStack Query + Zustand | Minimal API, maximum performance |
| Complex State Dependencies | TanStack Query + Jotai | Atomic fine-grained control, automatic optimization |
| 類型 | 工具 | 推薦理由 |
|---|---|---|
| 資料獲取 | TanStack Query | 自動快取、重試、樂觀更新 |
| 客戶端狀態 | Zustand/Jotai | 極簡 API、高效能/原子化 |
| 路由管理 | React Router v6 / Next.js App Router | 標準方案、型別安全 |
| 表單管理 | React Hook Form | 效能優異、驗證整合 |
| UI 增強 | @tanstack/react-virtual | 虛擬滾動、長列表優化 |
| Category | Tool | Recommendation Reason |
|---|---|---|
| Data Fetching | TanStack Query | Automatic caching, retries, optimistic updates |
| Client State | Zustand/Jotai | Minimal API, high performance/atomicity |
| Routing | React Router v6 / Next.js App Router | Standard solution, type-safe |
| Form Management | React Hook Form | Excellent performance, validation integration |
| UI Enhancement | @tanstack/react-virtual | Virtual scrolling, long list optimization |
Intersection ObserverscrollAbortControllerdebounceIntersection ObserverscrollAbortControllerdebounce| 工具 | 用途 | 安裝方式 |
|---|---|---|
| React DevTools | 組件檢查 | 瀏覽器擴充 |
| TanStack Query DevTools | 查詢調試 | |
| Redux DevTools | 狀態調試 | 瀏覽器擴充 + |
| Zustand DevTools | 狀態調試 | 使用 |
| Jotai DevTools | 狀態調試 | 使用 |
| Tool | Purpose | Installation Method |
|---|---|---|
| React DevTools | Component Inspection | Browser extension |
| TanStack Query DevTools | Query debugging | |
| Redux DevTools | State debugging | Browser extension + |
| Zustand DevTools | State debugging | Use |
| Jotai DevTools | State debugging | Use |
| 工具 | 監控目標 |
|---|---|
| React Profiler | 組件渲染效能 |
| Lighthouse | 整體網頁效能 |
| Web Vitals | 核心網頁指標 |
| Tool | Monitoring Target |
|---|---|
| React Profiler | Component rendering performance |
| Lighthouse | Overall web performance |
| Web Vitals | Core web vitals |
README.mdREADME.md