react

Implement React 19 components, hooks, Suspense boundaries, and TypeScript patterns.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/umairshahid622/perfumora --skill react-umairshahid622
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react
Source: https://github.com/umairshahid622/perfumora/tree/main/perfumora-admin/.claude/skills/react
Command: npx skills add https://github.com/umairshahid622/perfumora --skill react-umairshahid622

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React developers frequently struggle with inconsistent component structure, incorrect hook usage, unnecessary re-renders, and confusion around React 19 breaking changes like the removal of forwardRef and propTypes. This Skill provides concrete, copy-ready patterns that prevent common mistakes such as conditional hooks, missing effect dependencies, and state mutation. ## Core Features & Use Cases - Core Hooks Patterns: Ready-to-use templates for useState, useEffect, useCallback, and useMemo with correct dependency management and TypeScript typing. - Lazy Loading & Suspense: Code splitting patterns using React.lazy, Suspense boundaries, and error boundaries for route-level and feature-level splitting. - Performance Optimization: Guidance on React.memo, useTransition, useDeferredValue, list virtualization, and context optimization to eliminate wasted renders. - Use Case: When building a dashboard with heavy chart components, apply the lazy loading pattern to code-split each chart, wrap them in Suspense boundaries with skeleton fallbacks, and memoize event handlers to keep the UI responsive. ## Quick Start Ask the AI to create a typed React 19 component with lazy loading and a Suspense fallback following this skill's component checklist.

Frequently Asked Questions about react

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

FAQPage Schema
How do I lazy load React components with Suspense?▼

Use React.lazy with a dynamic import to code-split the component, then wrap it in a Suspense boundary with a fallback UI. For example, const Chart = React.lazy(() => import('./Chart')) rendered inside <Suspense fallback={<Loading />}>.

How do I use useCallback and useMemo correctly in React?▼

Use useCallback to stabilize event handlers passed to child components, listing all dependencies. Use useMemo only for expensive computations or derived state, not for every value, since unnecessary memoization adds overhead.

Does React 19 still require forwardRef?▼

No, React 19 removed the need for forwardRef. You can pass ref directly as a prop to function components and type it as React.Ref<HTMLElement> in the props interface.

Why does my React component re-render too often?▼

Common causes include inline object or array creation in JSX, unstable function references passed as props, and overly broad context values. Fix these with useMemo, useCallback, React.memo, and splitting contexts by concern.

Should I use React.FC for typing function components?▼

No, React.FC is discouraged in React 19. Define a props interface and use a plain function declaration instead, which gives clearer typing for children, generics, and default props.