Generate a new container component with data fetching, state management, and event handlers
Creates a new container component that handles data fetching, state management, and event handling. Containers are the bridge between pages and presentational components, following the Page -> Container -> Component pattern.
/new-container ProjectList
/new-container ProjectDetail
/new-container CreateProject
/new-container EditProject
Based on the name, infer the purpose:
| Name Pattern | Container Type |
|---|---|
| *List | List container: fetches array, renders list component |
| *Detail | Detail container: fetches single item by ID |
| Create* | Create form container: handles form submission |
| Edit* | Edit form container: fetches item + handles update |
Before generating, read:
patterns/frontend-patterns.md for conventionsskills/new-container/references/container-examples.md for examplesstyles/) for loading/error componentssrc/containers/ for project-specific patternssrc/services/ for API functionssrc/containers/<Name>Container.tsxAll containers are 'use client' components that:
Run npx tsc --noEmit to verify the container compiles.
'use client' directiveuseEffect with IIFE async patterntype for props (not interface)Container suffixCreated:
src/containers/<Name>Container.tsx -- Container implementation
src/containers/<Name>Container.test.tsx -- Unit tests
Verified:
npx tsc --noEmit -- PASS
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer