Presentational Container Pattern

Teaches the presentational/container pattern for separating view and logic. Use when you want to isolate data fetching and business logic from UI rendering for better testability and reuse.

259 stars 28 forksDocuments & Office Files

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add PatternsDev/skills --skill presentational-container-pattern
Manual install
git clone --depth 1 https://github.com/PatternsDev/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/react/presentational-container-pattern ~/.claude/skills/presentational-container-pattern

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Container/Presentational Pattern

In React, one way to enforce separation of concerns is by using the **Container/Presentational pattern**. With this pattern, we can separate the view from the application logic.

## When to Use

- Use this when you want a clear separation between data-fetching logic and UI rendering
- This is helpful for making presentational components reusable and easy to test

## When NOT to Use

- For small components where the separation into two files adds overhead without meaningful benefit
- When hooks already encapsulate the data logic, making a separate container component redundant
- When the component is a one-off view with no reuse potential for either layer

## Instructions

- Container components handle data fetching and state; presentational components handle rendering
- Prefer custom Hooks over container components in modern React for the same separation of concerns
- Keep presentational components as pure functions that receive data through props
- Use this pattern when it genuinely simplifies your architecture — avoid it for small components

## Details

Let's say we want to create an application that fetches 6 dog images, and renders these images on the screen.

Ideally, we want to enforce separation of concerns by separating this process into two parts:

1. **Presentational Components**: Components that care about _**how**_ data is shown to the user. In this example, that's the _rendering the list of dog images_.
Read the full skill on GitHub

Details

Skill name
presentational-container-pattern
Path
react/presentational-container-pattern/SKILL.md
Repo updated
15 April 2026

FAQ

What does the Presentational Container Pattern skill do?

Teaches the presentational/container pattern for separating view and logic. Use when you want to isolate data fetching and business logic from UI rendering for better testability and reuse.

How do I install the Presentational Container Pattern skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add PatternsDev/skills --skill presentational-container-pattern. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Presentational Container Pattern popular?

It lives in PatternsDev/skills, which has 259 GitHub stars and 28 forks.

Related skills

AI UI Patterns

259

PatternsDev/skills

Teaches design patterns for building AI-powered React interfaces. Use when creating chatbots, intelligent assistants, streaming UIs, or any AI-driven user experience in React.

Frontend & Design28

Async Components

259

PatternsDev/skills

Teaches async component loading in Vue for performance optimization. Use when you have heavy components that aren't needed on initial render and can be loaded on demand.

Frontend & Design28

Bundle Splitting

259

PatternsDev/skills

Teaches bundle splitting techniques for web performance. Use when your application has a large JavaScript bundle that affects load times or when you need to reduce FCP/LCP.

Software Development28

Frontend Slides

70

alexdcd/Mafia-Claude-Skills

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

Documents & Office FilesIn 2 lists18

Container Presentational

259

PatternsDev/skills

Teaches the container/presentational pattern for Vue components. Use when you want to separate data fetching and business logic from presentation for better testability and reuse.

Documents & Office Files28

Apply Comments

260

cafe3310/public-agent-skills

Apply pending @slide-comment markers written by the open-slide inspector tool. Use when the user asks to "apply comments", "process slide comments", "apply the inspector comments", or references markers left inside `slides/<id>/index.tsx`.

Documents & Office Files30

Browse the most popular Claude skills, all documents & office files skills, or write your own with the skills generator.