Split React components

Have Autohand Code apply React component architecture patterns to separate state, rendering, effects, and reusable child components.

Turn crowded components into clearer composition

Front-end Build and change Implementation Refactoring

autohand -p "Split this React component into smaller components using the existing project patterns"

Smaller React components with preserved behavior, cleaner props, and focused validation.

Split React components with Autohand Code is a front-end refactoring workflow that applies React composition patterns to separate view structure, state ownership, effects, and reusable pieces. ### At a glance | Question | Answer | | --- | --- | | Best for | large React components, tangled hooks, prop-heavy children, duplicated UI states, and files that slow review | | Primary inputs | The component file and nearby examples; States that must keep working; Preferred test, story, or browser validation path | | Autohand Code returns | Smaller React components with preserved behavior, cleaner props, and focused validation. | | Avoid when | the component behavior is being redesigned and the product states are not settled | ### How Autohand Code handles this workflow 1. Reads nearby components before choosing a split. 2. Identifies state owners, derived values, effects, and repeated markup. 3. Extracts named child components without changing public behavior. 4. Runs the closest test, story, or browser check and reports any visual risk. ### Best inputs - The component file and nearby examples - States that must keep working - Preferred test, story, or browser validation path ### Strong prompt autohand -p "Split this React component into smaller components using the existing project patterns" ### Autohand Code CLI options - Use `/skills use react-component-architecture` for React-specific composition guidance. - Run `autohand -p "Split this React component into smaller components using the existing project patterns"` from the app root. - Use `/review` after the patch to catch prop, state, or rendering regressions. ### Review before accepting The result should show clear component boundaries, stable props, preserved states, and a focused validation result. ### Source and validation signals Autohand AI maintains this workflow as first-party product guidance for Autohand Code. Use the [Autohand CLI Playbook](https://github.com/autohandai/code-cli/blob/main/docs/AUTOHAND_PLAYBOOK.md), [CLI reference](/docs/working-with-autohand-code/cli-reference.html), and [configuration reference](https://github.com/autohandai/code-cli/blob/main/docs/config-reference.md) when choosing between interactive mode, command mode, auto-mode, feature-enabled /goal, /settings, skills, MCP, and permission settings. The related resources below link to product docs and tutorials for the workflow, and the final answer should name repository-specific files, commands, outputs, or docs that a reviewer can verify. ### Frequently asked questions ### What is Split React components with Autohand Code? Split React components with Autohand Code is a front-end refactoring workflow that applies React composition patterns to separate view structure, state ownership, effects, and reusable pieces. ### When should a team use Split React components? Use it when one component has become too broad to review or extend safely. ### What evidence should reviewers check for Split React components? The result should show clear component boundaries, stable props, preserved states, and a focused validation result.

Skill Skilled: React Component Architecture Apply React composition and hook patterns. https://skilled.autohand.ai/skill/react-component-architecture Reference Agent Skills Use installed skills during implementation work. /docs/working-with-autohand-code/agent-skills.html Guide Frontend UI Skill Follow product UI conventions while changing components. /docs/guides/skills/frontend-ui.html