headless-ui
Installation
SKILL.md
Headless UI
Build headless UI hooks that encapsulate all application concerns (data fetching, state, routing, mutations) without any UI rendering logic. The hook is "headless" because it provides behavior without prescribing UI implementation.
Overview
A headless UI hook is a custom React hook that returns a structured object containing data, state, actions, and pending states. Pages consume these hooks and compose pure view components.
// The pattern: hook provides behavior, component provides UI
const { todos, handleCreate, isPending } = useTodosPage();
return <TodoList todos={todos} onCreate={handleCreate} isCreating={isPending.create} />;