본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)18k · #10704

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/react-expert/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 useState for local UI state, useReducer for complex state transitions with multiple sub-values
  • Apply useEffect for synchronizing with external systems (API calls, subscriptions, DOM measurements); always return a cleanup function
  • Memoize expensive computations with useMemo and stable callback references with useCallback, 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 forwardRef and expose imperative methods sparingly with useImperativeHandle

Common Patterns

  • Controlled Components: Manage form input values in state with value={state} and onChange={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 key prop 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.memo because references change every render
  • Do not use useEffect for derived state; compute derived values during render or use useMemo instead 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬