presentational-components

Enforce presentational component patterns and domain-focused hooks in React applications.

1|2|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/addisonk/claude-code-skills --skill presentational-components
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: presentational-components
Source: https://github.com/addisonk/claude-code-skills/tree/main/dev-tools/presentational-components
Command: npx skills add https://github.com/addisonk/claude-code-skills --skill presentational-components

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces a strict separation between UI presentation and data logic in React applications, leading to more maintainable, testable, and reusable code.

Core Features & Use Cases

  • Enforces Presentational Components: Ensures UI components only receive data via props and trigger actions via callbacks, preventing direct data fetching or side effects within them.
  • Promotes Domain-Focused Hooks: Guides the creation of reusable hooks named after the data domain (e.g., useCommunity) rather than specific UI components.
  • Use Case: When building a new feature with multiple components that display user data and allow interactions like editing or deleting, use this skill to ensure a clean architecture where components are easily testable and reusable.

Quick Start

Review the current component architecture to ensure all data is passed via props and actions are handled by callbacks.

Frequently Asked Questions about presentational-components

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

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

To separate data logic from UI components in React, enforce presentational patterns where components only receive data via props and trigger actions via callbacks. This prevents direct data fetching within the UI, moving side effects into domain-focused hooks.

What is a domain-focused hook in React code architecture?

A domain-focused hook in React code architecture is a reusable hook named after the data domain, such as useCommunity, rather than specific UI components. This pattern cleanly separates data fetching and side effects from presentational UI rendering.

How do I refactor a React component to use presentational patterns?

To refactor a React component to use presentational patterns, review the current architecture to ensure all data is passed via props and actions are handled by callbacks. Move existing data fetching logic out of the UI component into a dedicated domain-focused hook.

Does this presentational component pattern work with Convex or Clerk?

Yes, this presentational component pattern works with Convex or Clerk. It is specifically designed for refactoring React apps using frameworks like these, ensuring a clear pattern for wiring data and actions in parent components while keeping UI presentation separate.

Why should I use presentational components instead of fetching data directly?

You should use presentational components instead of fetching data directly because strict separation of concerns leads to more maintainable, testable, and reusable React code. UI components without side effects are easily testable and can be reused across different features.

When should I not use presentational components in my React application?

You should avoid presentational components when building simple React features where the overhead of creating domain-focused hooks and passing props adds unnecessary complexity, rather than improving maintainability or code reuse for a small, self-contained UI element.