frontend-component-creation

Refactor React Native component files in RemoteUnlockApp with named exports and one component per file.

Updated Jun 14, 2024
One-click install
npx skills add https://github.com/Yimura/RemoteUnlockApp --skill frontend-component-creation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-component-creation
Source: https://github.com/Yimura/RemoteUnlockApp/tree/main/.claude/skills/frontend-component-creation
Command: npx skills add https://github.com/Yimura/RemoteUnlockApp --skill frontend-component-creation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write, refactor, and fix React Native component files in RemoteUnlockApp while keeping them small, reusable, and aligned with the project's architecture rules.

Core Features & Use Cases

  • Keeps component files pure, named, and organized around one component per file.
  • Moves multi-step logic into hooks and shared behavior into context when prop drilling grows too deep.
  • Encourages reuse of existing primitives, shared components, and theme aliases instead of duplicating UI.
  • Fits common tasks such as splitting a crowded screen into reusable pieces, promoting a generic control into a shared component, or correcting a component that mixes layout with data fetching.

Quick Start

Refactor or create a RemoteUnlockApp React Native component so it follows the project's rules for props, hooks, context, reuse, file naming, and export structure.

Frequently Asked Questions about frontend-component-creation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor React Native components to enforce one component per file?

Refactoring React Native components to enforce one component per file requires isolating each UI element into its own module with named exports. This approach mandates non-exported props types and kebab-case file naming to maintain structural purity and prevent bloated component logic.

What is the best way to extract multi-step logic from React Native components?

Extracting multi-step logic from React Native components involves moving complex sequences into custom hooks. This process isolates data fetching and stateful operations from layout rendering, ensuring screens remain pure and reusable across the application architecture.

When do I need shared UI context in React Native?

You need shared UI context in React Native when prop drilling grows too deep across the component tree. Moving shared behavior into context prevents passing props through multiple layers, centralizing state management for reusable primitives and theme aliases.

Does this component refactoring approach require named exports for all files?

Yes, this component refactoring approach requires named exports for all files. It strictly enforces named exports alongside one component per file, non-exported props types, and kebab-case naming for new files to align with RemoteUnlockApp architecture rules.

How do I split a crowded React Native screen into reusable pieces?

Splitting a crowded React Native screen involves breaking down the layout into smaller, named components and extracting multi-step logic into hooks. This refactoring promotes generic controls into shared components, maximizing reuse of existing primitives and theme aliases.