react-patterns▌
casper-studios/casper-marketplace · updated Apr 8, 2026
Core React patterns for component design, state management, and optimization.
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
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★61 reviews- ★★★★★Mia Patel· Dec 28, 2024
We added react-patterns from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Fatima Nasser· Dec 24, 2024
I recommend react-patterns for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Liam Chawla· Dec 20, 2024
Keeps context tight: react-patterns is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Mia Srinivasan· Dec 16, 2024
react-patterns is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Diya Garcia· Dec 8, 2024
Useful defaults in react-patterns — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Mia Taylor· Nov 23, 2024
Useful defaults in react-patterns — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Mia Brown· Nov 19, 2024
Solid pick for teams standardizing on skills: react-patterns is focused, and the summary matches what you get after install.
- ★★★★★Ishan Khanna· Nov 11, 2024
Registry listing for react-patterns matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Mia Kim· Nov 7, 2024
react-patterns reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Chinedu Liu· Oct 26, 2024
Registry listing for react-patterns matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 61