Skip to content

chore: say where hooks live, let blocks take assets and plays reach a state in skills - #214

Merged
dangreen merged 1 commit into
mainfrom
chore/skills-hooks-plays
Nov 25, 2026
Merged

dangreen merged 1 commit into
mainfrom
chore/skills-hooks-plays

Conversation

@dangreen

Copy link
Copy Markdown
Member

Three skills take what the lint rules in the PRs above it settled, so each rule has a skill to point at.

  • Where hooks live (react-component, flat-layers-design): in a .jsx or .tsx file, in a hooks.ts, or in a file of a hooks/ folder, wherever it stands: uikit/hooks.ts, blocks/shared/hooks.ts, blocks/shared/hooks/garden.ts. The rules of hooks and React Compiler's rules find hooks by these files, so a hook in any other module goes unchecked. hooks.ts is the one file named by kind that a shared/ folder may hold, and a component's extracted logic moves from use[HookName].ts to hooks.ts.
  • Blocks take assets (flat-layers-design), as uikit and pages do: an asset imports nothing, and a block's illustration or a story's stand-in photo needs one.
  • Story controls (storybook): argTypes options are written inline beside their control, where a glance checks them against the type; a list too long to read there, such as every icon, comes from the component's typed constant.
  • Plays and specs (storybook): a story's play brings it into the state it shows, the way a person gets there, and asserts nothing, since a check there runs only where someone opens the story. A state the story can reach through its args, decorator or mock data takes that instead. Specs assert, and reach a story's state through the composed story's run().

🤖 Generated with Claude Code

@dangreen
dangreen added this pull request to stack #222 November 25, 2026 17:13
@dangreen
dangreen merged commit 0fab147 into main Nov 25, 2026
6 checks passed
@dangreen
dangreen deleted the chore/skills-hooks-plays branch November 25, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant