react-writing-code

Guide React development, review, and refactoring with React 19 patterns.

2|1|Updated Nov 13, 2025
One-click install
npx skills add https://github.com/MolcajeteAI/plugin --skill react-writing-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-writing-code
Source: https://github.com/MolcajeteAI/plugin/tree/main/molcajete/skills/react-writing-code
Command: npx skills add https://github.com/MolcajeteAI/plugin --skill react-writing-code

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance and best practices for writing, reviewing, and refactoring React code, ensuring maintainability, performance, and adherence to modern patterns.

Core Features & Use Cases

  • React 19 Patterns: Understand server/client components, Actions, and ref as a prop.
  • Component Composition: Learn to build reusable and flexible UI components.
  • Custom Hooks: Extract and manage stateful logic effectively.
  • State Management: Choose the right tools (Zustand, urql) for different state types.
  • Performance Optimization: Identify and fix performance bottlenecks.
  • Use Case: When developing a new feature, use this Skill to ensure your React components are structured efficiently, state is managed correctly, and performance is considered from the outset.

Quick Start

Use the react-writing-code skill to refactor a component to use composition over configuration.

Frequently Asked Questions about react-writing-code

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

FAQPage Schema
How do I refactor React components to use composition over configuration?

To refactor React components using composition, build flexible UI components by extracting stateful logic into custom hooks. This approach ensures your React code remains maintainable and reusable without relying on complex configuration props.

What's the best way to manage state in React with Zustand and urql?

Managing React state with Zustand handles global client state efficiently, while urql manages server and remote data fetching. Choosing the right tool for different state types ensures your React application maintains performance and scalability.

How do React 19 server components and Actions change frontend development?

React 19 server components and Actions change frontend development by allowing server-side rendering and direct server mutations. This modern pattern reduces client-side JavaScript and optimizes performance bottlenecks in your React application.

When should I extract custom hooks for state management in React?

You should extract custom hooks for state management in React when component logic becomes complex or reusable. Extracting stateful logic into custom hooks ensures code quality, maintainability, and efficient component composition.

How do I identify and fix performance bottlenecks in React applications?

To identify and fix performance bottlenecks in React, analyze component rendering patterns and optimize state management with tools like Zustand. Applying modern React patterns ensures efficient rendering and maintains application performance.

Does this React guidance cover using ref as a prop in component development?

Yes, this React guidance covers using ref as a prop in component development. Understanding this React 19 feature allows you to build reusable components and manage DOM access efficiently without breaking composition patterns.