react

Creates TypeScript React components and hooks with modern patterns and guidance for composition and optimization.

8|1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/belos-street/skill-kit --skill react-belos-street
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react
Source: https://github.com/belos-street/skill-kit/tree/main/skills/react
Command: npx skills add https://github.com/belos-street/skill-kit --skill react-belos-street

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Reduce developer confusion and runtime bugs when building modern React UIs by providing clear patterns for hooks, component composition, performance optimization, and server/client boundaries in TypeScript. The guidance helps teams adopt consistent, maintainable practices across function components, context, refs, Suspense, and server components.

Core Features & Use Cases

  • Comprehensive hooks reference and recommended usage for state, effects, memoization, transitions, and external subscriptions.
  • Component patterns covering composition, render props, forwardRef, memoization, compound components, and generic typing.
  • Advanced topics including Suspense, lazy loading, error boundaries, refs, portals, and server components with client directives.
  • Use Case: Migrate a legacy class-based UI to a TypeScript-first functional component architecture with improved performance and testability.

Quick Start

Use the react skill to draft a TypeScript function component that uses hooks for state, memoization for expensive computations, and a Context provider for shared state.

Frequently Asked Questions about react

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

FAQPage Schema
How do I build type-safe React components with modern hooks and patterns?

Build type-safe React components by applying TypeScript typing, hooks usage rules, and composition patterns. This approach covers state, effects, memoization, and Context providers to ensure robust, maintainable UI components.

What's the best way to migrate legacy class-based React UIs to functional components?

Migrate legacy class-based UIs by adopting a TypeScript-first functional component architecture. This transition improves performance and testability by replacing class lifecycles with modern hooks for state and effects.

How does Suspense work with React Server Components and lazy loading?

Suspense works with React Server Components by handling asynchronous rendering boundaries, allowing lazy loading of components. It pairs with error boundaries to manage fallback UI during data fetching or code splitting.

When do I need Error Boundaries and Context providers in React?

Use Error Boundaries to catch JavaScript errors in the child component tree, and use Context providers to share state across deeply nested components without prop drilling. Both ensure robust component composition.

Can I use forwardRef and memoization for performance optimization in TypeScript React components?

Use forwardRef to expose child component DOM nodes to parent components, and apply memoization techniques to prevent unnecessary re-renders. Both are supported patterns for TypeScript performance optimization in functional components.

What are the rules for hook usage in functional components with TypeScript?

Follow hook usage rules by calling hooks at the top level of functional components, not inside loops or conditions. Satisfy TypeScript typing requirements by defining strict input and output types for custom hooks.