Home / Skills / dataelement/bisheng

react-component-refactor

Refactor large React components by extracting hooks, splitting sub-components, and organizing directory structure following established patterns.

skillLicense: Apache-2.0 Source: dataelement/bisheng

Install

Copy this folder into your Claude Code project (needs Node.js):

npx degit dataelement/bisheng/.claude/skills/react-component-refactor .claude/skills/react-component-refactor

Or install it for every project:

npx degit dataelement/bisheng/.claude/skills/react-component-refactor ~/.claude/skills/react-component-refactor

File content

Made by its original authors and shared under Apache-2.0. We show it unchanged, with credit and a link to the source. Source ↗

---
name: react-component-refactor
description: Refactor large React components by extracting hooks, splitting sub-components, and organizing directory structure following established patterns.
---

# React Component Refactor

This skill provides a systematic approach for refactoring complex React components. Use it when a module has overgrown files, tangled state, or unclear separation of concerns.

## Instructions
1. **Read the Guidelines**: Read `resources/GUIDELINES.md` for the complete refactoring checklist and rules.
2. **Read the Examples**: Read `resources/EXAMPLES.md` for concrete before/after patterns from real refactoring work.
3. **Execute**: Follow the guidelines to refactor the target module.