react

Guide React 18/19 development with hooks, component patterns, and performance best practices.

1|Updated Sep 26, 2025
One-click install
npx skills add https://github.com/pascallammers/mylo-travel-concierge-v2 --skill react-pascallammers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react
Source: https://github.com/pascallammers/mylo-travel-concierge-v2/tree/main/.factory/skills/react
Command: npx skills add https://github.com/pascallammers/mylo-travel-concierge-v2 --skill react-pascallammers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers write more efficient, maintainable, and performant React applications by providing expert guidance on best practices, hooks, and component patterns.

Core Features & Use Cases

  • Hook Usage: Detailed explanations and examples for useState, useEffect, useCallback, useMemo, useRef, useContext, and useReducer.
  • Component Patterns: Demonstrates effective component composition and custom hook creation.
  • Best Practices: Enforces modern React principles like Server Components and proper dependency management.
  • Use Case: A developer struggling with a performance issue in their React app can consult this Skill for optimized hook usage and component patterns to resolve the bottleneck.

Quick Start

Show me good examples of using the useState hook in React.

Frequently Asked Questions about react

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

FAQPage Schema
What's the best way to manage complex state in React 18?

For complex state in React 18, use the `useReducer` hook instead of `useState` to manage centralized logic, enabling predictable state transitions and easier testing of component behavior.

How do I optimize React performance using useCallback and useMemo?

Optimize React performance by applying `useMemo` to cache expensive calculations and `useCallback` to memoize functions, preventing unnecessary re-renders when passing callbacks to child components.

When should I use useRef instead of useState in React components?

Use `useRef` instead of `useState` when you need to directly manipulate the DOM or store mutable values that do not require triggering a component re-render upon updates.

What are common React hooks anti-patterns and how do I fix them?

Common React hooks anti-patterns include missing effect dependencies and infinite loops; fix them by properly managing `useEffect` dependency arrays and extracting reusable logic into custom hooks.

Does this React best practices guide cover Server Components?

Yes, this guidance enforces modern React principles including Server Components, ensuring proper dependency management and efficient data fetching patterns for robust frontend applications.

How do I share logic across multiple React components?

Share logic across React components by creating custom hooks, allowing you to extract stateful logic and reuse it throughout your application while maintaining clean component composition.