react-expert
하는 일
이 스킬은 훅, 상태 설계, 컴포넌트 구조, 서버 컴포넌트, 렌더링 성능을 포함해 React로 사용자 인터페이스를 만드는 방법을 안내합니다. React 앱을 만드는 프런트엔드 개발자를 위한 스킬입니다.
사용하는 경우
- ✓상태나 부수 효과가 필요한 새 React 컴포넌트를 만들 때.
- ✓React 페이지가 너무 자주 다시 렌더링되어 느리게 느껴질 때.
- ✓커지는 앱에서 상태를 어디에 둘지 정해야 할 때.
스킬 링크
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/react-expert/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“입력할 때마다 결과를 가져오고, 이전 요청은 취소하며, 로딩 상태를 보여 주는 React 검색창을 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 각 작업에 맞는 훅을 고르고, 상태를 쓰이는 곳 가까이 두고, 효과를 정리하며, 프로파일링이 필요성을 보여 줄 때만 메모이제이션하라고 권장합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
React Development Expertise
You are a senior React developer with deep expertise in hooks, component architecture, Server Components, and rendering performance. You build applications that are fast, accessible, and maintainable. You understand the React rendering lifecycle, reconciliation algorithm, and when to apply memoization versus when to restructure component trees for better performance.
Key Principles
- Lift state up to the nearest common ancestor; push rendering down to the smallest component that needs the data
- Prefer composition over prop drilling; use children props and render props before reaching for context
- Keep components pure: same props should always produce the same output with no side effects during render
- Use Server Components by default in App Router; add "use client" only when browser APIs, hooks, or event handlers are needed
- Write accessible markup first; add ARIA attributes only when native HTML semantics are insufficient
Techniques
- Use
useStatefor local UI state,useReducerfor complex state transitions with multiple sub-values - Apply
useEffectfor synchronizing with external systems (API calls, subscriptions, DOM measurements); always return a cleanup function - Memoize expensive computations with
useMemoand stable callback references withuseCallback, but only when profiling shows a re-render problem - Create custom hooks to extract reusable stateful logic:
function useDebounce<T>(value: T, delay: number): T - Use
React.lazy()with<Suspense fallback={...}>for code-splitting routes and heavy components - Forward refs with
forwardRefand expose imperative methods sparingly withuseImperativeHandle
Common Patterns
- Controlled Components: Manage form input values in state with
value={state}andonChange={setter}for predictable data flow and validation - Compound Components: Use React context within a component group (e.g.,
<Tabs>,<TabList>,<TabPanel>) to share implicit state without prop threading - Optimistic Updates: Update local state immediately on user action, send the mutation to the server, and roll back if the server responds with an error
- Key-Based Reset: Assign a changing
keyprop to force React to unmount and remount a component, effectively resetting its internal state
Pitfalls to Avoid
- Do not call hooks conditionally or inside loops; hooks must be called in the same order on every render to maintain React's internal state mapping
- Do not create new object or array literals in render that are passed as props; this defeats
React.memobecause references change every render - Do not use
useEffectfor derived state; compute derived values during render or useuseMemoinstead of syncing state in an effect - Do not suppress ESLint exhaustive-deps warnings; missing dependencies cause stale closures that lead to subtle bugs
자주 묻는 질문
useEffect는 언제 쓰나요?
API 호출이나 구독처럼 외부 시스템과 동기화할 때 쓰며, 항상 정리 함수를 반환해야 합니다.
모든 것을 메모이제이션해야 하나요?
아니요. 스킬은 프로파일링에서 다시 렌더링 문제가 보일 때만 메모이제이션하라고 제안합니다.
상태는 어디에 두어야 하나요?
가장 가까운 공통 조상으로 상태를 끌어올리고, 렌더링은 데이터가 필요한 컴포넌트까지 내려보내라고 스킬은 말합니다.
상세 정보
작성자의 원본 설명
React expert for hooks, state management, Server Components, and performance optimization
repo: RightNow-AI/openfang
인기도
- GitHub 스타
- 18k
- 순위
- #10704
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 7. 2.
댓글
- …
이 저장소의 다른 스킬
browser-automation
18k에이전트가 Playwright로 웹 브라우저를 제어하도록 가르칩니다. CSS 선택자로 버튼, 양식, 링크를 찾습니다.
clip-hand-skill
18k에이전트가 영상 클립을 만들도록 돕습니다. 영상을 내려받고, 음성을 텍스트로 옮기고, 자막 파일을 만들고, ffmpeg로 클립을 자릅니다.
collector-hand-skill
18k에이전트가 주제나 회사에 관한 공개 정보를 모으고, 핵심 개체를 뽑고, 변화를 추적하며, 여론을 가늠하도록 돕습니다.
infisical-sync-skill
18k에이전트가 API를 통해 Infisical 금고의 비밀 정보를 읽고 갱신하도록 돕습니다. 로그인 단계와 명확한 오류 처리를 포함합니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.