react-hooks-components

React Hooks & Components

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "react-hooks-components" with this command: npx skills add sraloff/gravityboots/sraloff-gravityboots-react-hooks-components

React Hooks & Components

When to use this skill

  • Creating functional components.

  • Designing custom hooks.

  • optimizing re-renders.

  1. Hooks Rules
  • Top Level: Only call hooks at the top level of the component/hook.

  • Dependencies: Be honest with dependency arrays in useEffect , useCallback , and useMemo . Use linter to enforce.

  1. Memoization
  • UseMemo/UseCallback: Use only when the calculation is expensive OR when passing functions/objects as props to memoized children. Over-memoization adds overhead.

  • Stable References: Remember that objects/arrays defined inside component body are new references every render.

  1. Component Composition
  • Props: Pass children (slots) instead of prop drilling complex state.

  • Container/Presenter: Separate logic (data fetching) from UI rendering where complex.

  1. State Management
  • Local vs Global: Keep state as local as possible. Move up only when siblings need to share it.

  • Context: Use Context for low-velocity global data (theme, user). For high-velocity data, use a signal-based library or optimized subscriber pattern.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

caddy-modern-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

apache-lamp-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

mysql-lamp-legacy

No summary provided by upstream source.

Repository SourceNeeds Review
General

postgresql-query-opt

No summary provided by upstream source.

Repository SourceNeeds Review