patterns

Structure React components with separated data fetching, coordination, and rendering.

4|1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/reliant-labs/forge --skill patterns-reliant-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: patterns
Source: https://github.com/reliant-labs/forge/tree/main/internal/templates/project/skills/forge/frontend/patterns
Command: npx skills add https://github.com/reliant-labs/forge --skill patterns-reliant-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps frontend teams avoid tangled React components by enforcing practical patterns for composition, container vs. presentational separation, correct effects usage, and typed boundaries.

Core Features & Use Cases

  • Composition over prop drilling using slots/children to keep intermediate components focused on layout rather than business data.
  • Container vs presentational split so data fetching and coordination are isolated from pure rendering logic for easier testing and reuse.
  • Effects discipline to prevent derived state bugs by reserving useEffect for external synchronization only.
  • Typed boundaries to validate external inputs at APIs, forms, event payloads, and route params.
  • Reusable components with controlled interfaces so state is managed predictably by parents.

Quick Start

Apply these frontend component patterns while building a new page or layout by using slots for structural composition, keeping containers responsible for fetching, deriving values during render, validating external inputs with schemas, and ensuring the UI components are controlled where reuse matters.

Frequently Asked Questions about patterns

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

FAQPage Schema
How do I separate data fetching from rendering logic in React components?

Apply the container vs presentational split pattern to isolate data fetching and coordination logic from pure rendering components, making your React components easier to test and reuse across different views.

What is the best way to avoid prop drilling when building React page layouts?

Use composition via slots and children to keep intermediate components focused on layout rather than business data, avoiding prop drilling while building React page layouts and structural flows.

Why does my useEffect cause derived state bugs in TypeScript UI codebases?

Your useEffect causes derived state bugs because it is being used for state transformations rather than external synchronization. Enforce effects discipline by reserving useEffect strictly for external system synchronization.

How do I validate API and form inputs at typed boundaries in a React application?

Validate API and form inputs at typed boundaries in a React application by applying schemas to validate external inputs at APIs, forms, event payloads, and route params, ensuring type safety across your TypeScript UI codebase.

Can I use controlled component APIs to manage state predictably in React forms?

Yes, you can use controlled component APIs to manage state predictably in React forms by ensuring parents manage state where reuse matters, keeping the UI components controlled and predictable.

When do I need container vs presentational separation in TypeScript frontend development?

You need container vs presentational separation in TypeScript frontend development when building page-level flows, layout components, forms, and event-driven features where data fetching and coordination must stay cleanly separated from rendering.