react-patterns

Core React patterns for component design, state management, and optimization.

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-patterns" with this command: npx skills add casper-studios/casper-marketplace/casper-studios-casper-marketplace-react-patterns

React Patterns

Core React patterns for component design, state management, and optimization.

State Philosophy

Avoid state variables. Prefer derived values and props. Scope state to the smallest subtree that needs it. Use discriminated unions for complex state.

See state-management.md for:

  • Derived values over state

  • Component boundaries for state scoping

  • Context API patterns

  • Zustand for complex state

  • State machines over multiple useState

Memoization

Required for any O(n) operation. Memoize atomically to minimize dependency arrays. Use Loader/Inner pattern to narrow types before useMemo.

See memoization.md for:

  • When to useMemo

  • Atomic memoization

  • useCallback for handlers

  • Loader/Inner pattern for type narrowing

Conditional Logic

Use affirmative logic, explicit conditionals, and ternaries over && . Early returns for guard clauses.

See conditional-logic.md for:

  • Affirmative logic

  • Explicit conditionals

  • Conditional rendering

  • Type narrowing with conditionals

  • Early returns

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

firecrawl-scraping

No summary provided by upstream source.

Repository SourceNeeds Review
General

pr-summary

No summary provided by upstream source.

Repository SourceNeeds Review
General

attio-crm

No summary provided by upstream source.

Repository SourceNeeds Review