一键导入
react-hooks
Guidelines for creating and maintaining custom React hooks in FinanzApp Frontend.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guidelines for creating and maintaining custom React hooks in FinanzApp Frontend.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | react-hooks |
| description | Guidelines for creating and maintaining custom React hooks in FinanzApp Frontend. |
This skill ensures that all custom hooks follow best practices for maintainability, testability, and performance.
use (e.g., useAuth, useOrders).src/hooks/useAuth.ts).src/utils/ to keep the hook clean and easily testable.src/services/ for API interactions..test.ts file in the same directory.useReducer for complex state logic or break the hook into smaller, specialized hooks.// src/hooks/useLogin.ts
import { useState } from 'react';
import { login } from '@/services/AuthService';
import { validateLogin } from '@/utils/auth-validation'; // Logic extracted to utils
export function useLogin() {
const [loading, setLoading] = useState(false);
// ... logic using services and utils
return { loading, /* ... */ };
}
Extracting logic to utils allows testing business rules in isolation without needing to mock the React environment (hooks), leading to more robust and faster tests.
Mandatory rule requiring a corresponding test file for every business logic file and UI component.
Guidelines for frontend component and E2E testing in FinanzApp.
Component organization and modern React principles for the FrontEnd.
Catalog of all specialized skills used across the FinanzApp project (Frontend & Backend).
Reglas obligatorias para garantizar la accesibilidad web (A11y) en FinanzApp. Sigue estándares WCAG 2.1 para usuarios con discapacidad visual y navegación por teclado.
Guidelines for cross-layer testing (Hooks + UI + Services) using real logic and MSW for network interception.