hooks-pattern
๐ฏSkillfrom patternsdev/skills
Agent skill from patterns.dev that teaches the React Hooks pattern โ using functions to reuse stateful logic among multiple components โ packaged as a stripped-down, agent-optimized version of the patterns.dev content (prose + code only, no interactive embeds).
Same repository
patternsdev/skills(58 items)
Installation
npx vibeindex add patternsdev/skills --skill hooks-patternnpx skills add patternsdev/skills --skill hooks-pattern~/.claude/skills/hooks-pattern/SKILL.mdSKILL.md
More from this repository10
Agent skill from patterns.dev providing a comprehensive guide to building React apps with a modern 2026 stack โ part of the React design pattern set in an agent-optimized prose+code format.
Agent skill from patterns.dev covering design patterns for building AI-powered interfaces like chatbots and assistants โ an agent-optimized, prose+code-only version of the patterns.dev React design pattern content (no iframes or videos).
Patterns.dev skill for modern React composition โ replace boolean-prop proliferation with explicit composition, build compound components with Context, use explicit variant components over mode props, prefer children over render props, and decouple state interface from implementation so providers can swap without changing consumers. Applied during component design, generation, and review.
patterns.dev skill teaching **`import()` dynamic imports** for on-demand code loading โ use `React.lazy` + `Suspense` (or `loadable-components` for SSR) to keep modals, emoji pickers, and other non-critical modules out of the initial bundle, with an example reducing the main bundle from 1.5 MiB to 1.33 MiB.
Patterns.dev skill teaching modern React data-fetching patterns โ parallel fetches with `Promise.all`, defer-await, TanStack Query / SWR with caching and deduplication, Suspense + `useSuspenseQuery` for declarative loading, and prefetch-on-hover for instant navigation. Applied during code generation, review, and refactoring of `fetch` + `useEffect` anti-patterns.
Patterns.dev skill for React render-performance optimization โ compute derived values during render (not stored state), subscribe to coarse-grained values (`isMobile` not `width`), extract expensive subtrees into memoized components for early-return skipping, lazy `useState` init, and functional `setState` for stable callbacks. Ordered by impact, with React Compiler caveats noted.
patterns.dev skill teaching **bundle splitting** with Webpack or Rollup โ separate non-critical code (rarely-used features, interaction-triggered modules) out of the initial bundle to improve FCP, LCP, and TTI without changing user-visible behavior.
patterns.dev skill teaching **JavaScript compression** โ prefer Brotli over Gzip at the server/CDN or via Webpack `CompressionPlugin`/`BrotliWebpackPlugin`, always minify first, and respect the granularity trade-off that a single large bundle compresses better (`compress(a+b) <= compress(a)+compress(b)`) while smaller chunks cache better.
patterns.dev skill teaching **interaction-based lazy loading** โ defer heavy modules (video players, chat widgets, auth SDKs, share features) with dynamic `import()` and lightweight facades (e.g. YouTube Lite Embed) so they only load on click/hover, improving FID/INP and TTI.
Teaches how to order resource loading โ critical HTML, CSS, JS, fonts, images โ so your app becomes usable as quickly as possible. Part of the patterns.dev performance pattern library.