react

Implements React 19 component patterns with hooks, Suspense, lazy loading, and TypeScript.

4|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/minexo79/coser-card-maker --skill react-minexo79
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react
Source: https://github.com/minexo79/coser-card-maker/tree/main/.kilo/skills/react
Command: npx skills add https://github.com/minexo79/coser-card-maker --skill react-minexo79

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building React applications requires consistent knowledge of hooks rules, code splitting, Suspense boundaries, and TypeScript typing, and mistakes like conditional hooks or missing dependencies cause subtle bugs. This Skill provides vetted React 19 patterns so components are structured correctly from the start. ## Core Features & Use Cases - Hooks Patterns: Correct usage of useState, useEffect, useCallback, useMemo, plus a library of custom hooks like useDebounce, useFetch, and useLocalStorage. - Code Splitting & Suspense: Lazy loading with React.lazy, nested Suspense boundaries, and error boundary integration for granular loading states. - TypeScript Integration: Typed props, generic components, discriminated unions for state, context typing, and polymorphic component patterns. - Use Case: When building a dashboard with heavy chart components, apply lazy loading with Suspense fallbacks, memoize expensive list renders, and type all props with interfaces to prevent re-render and type errors. ## Quick Start Use the react skill to create a lazily loaded dashboard component with typed props and a Suspense fallback.

Frequently Asked Questions about react

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

FAQPage Schema
How do I lazy load components in React 19?

Use React.lazy with a dynamic import, then wrap the component in a Suspense boundary with a fallback UI. For example, const Chart = React.lazy(() => import('./Chart')) rendered inside <Suspense fallback={<Loading />}>. Route-level splitting works the same way for page components.

How do I prevent unnecessary re-renders in React?

Wrap expensive pure components in React.memo, stabilize event handlers with useCallback, and memoize expensive computations with useMemo. Avoid creating inline objects or arrays in JSX since new references trigger child re-renders.

Is forwardRef still needed in React 19?

No, React 19 removed the need for forwardRef. You pass ref directly as a regular prop to function components and type it as React.Ref<HTMLElement>. The old forwardRef API still works but is no longer required.

Why does my useEffect run with stale data?

Stale data usually means missing dependencies in the dependency array. Every value used inside useEffect that can change, such as userId, must be listed in the deps array so the effect re-runs when it changes.

When should I use useTransition vs useDeferredValue?

Use useTransition when you control the state update and want to mark it as non-urgent, such as tab switches. Use useDeferredValue when you receive a value from a parent, like a search query, and want to defer expensive re-renders derived from it.