vercel-composition-patterns

द्वारा supabase

React संरचना पैटर्न जो स्केल करते हैं। घटकों को रीफैक्टर करते समय उपयोग करें

npx skills add https://github.com/supabase/supabase --skill vercel-composition-patterns

React Composition Patterns

Composition patterns for building flexible, maintainable React components. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals. These patterns make codebases easier for both humans and AI agents to work with as they scale.

When to Apply

Reference these guidelines when:

  • Refactoring components with many boolean props
  • Building reusable component libraries
  • Designing flexible component APIs
  • Reviewing component architecture
  • Working with compound components or context providers

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Component ArchitectureHIGHarchitecture-
2State ManagementMEDIUMstate-
3Implementation PatternsMEDIUMpatterns-
4React 19 APIsMEDIUMreact19-

Quick Reference

1. Component Architecture (HIGH)

  • architecture-avoid-boolean-props - Don't add boolean props to customize behavior; use composition
  • architecture-compound-components - Structure complex components with shared context

2. State Management (MEDIUM)

  • state-decouple-implementation - Provider is the only place that knows how state is managed
  • state-context-interface - Define generic interface with state, actions, meta for dependency injection
  • state-lift-state - Move state into provider components for sibling access

3. Implementation Patterns (MEDIUM)

  • patterns-explicit-variants - Create explicit variant components instead of boolean modes
  • patterns-children-over-render-props - Use children for composition instead of renderX props

4. React 19 APIs (MEDIUM)

⚠️ React 19+ only. Skip these patterns if you're on React 18 or earlier.

  • react19-no-forwardref - Don't use forwardRef; use use() instead of useContext()

How to Use

Read individual rule files for detailed explanations and code examples:

rules/architecture-avoid-boolean-props.md
rules/state-context-interface.md

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Additional context and references

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

supabase की और Skills

studio-e2e-tests
supabase
Supabase Studio के लिए Playwright E2E परीक्षण लिखें और चलाएं। जब पूछा जाए तब उपयोग करें।
pm-the-docs
supabase
Docs-PM "Write the docs" लेखन प्रक्रिया के लिए निर्णय समर्थन — Frame और Shape चरणों के दौरान दर्शकों, चरण और क्रॉस-कटिंग दायरे के निर्णय लेता है,…
studio-best-practices
supabase
React और TypeScript के लिए Supabase Studio की सर्वोत्तम प्रथाएँ। Studio घटकों को लिखते या समीक्षा करते समय उपयोग करें — boolean नामकरण, घटक संरचना,… को शामिल करता है
docs-content
supabase
apps/docs में कहीं भी Supabase सामग्री लिखें, संपादित करें, व्यवस्थित करें और समीक्षा करें — गाइड, व्याख्याकार, ट्यूटोरियल, समस्या निवारण प्रविष्टियाँ, संदर्भ दस्तावेज़, और…
studio-mock-api-tests
supabase
Supabase Studio के लिए कंपोनेंट परीक्षण जो MSW के साथ नेटवर्क परत पर API अनुरोधों को मॉक करते हैं। React… का उपयोग करने वाले कंपोनेंट परीक्षण को लिखते या समीक्षा करते समय उपयोग करें।
studio-ui-patterns
supabase
Design system UI patterns for Supabase Studio. Use when building or updating pages, forms, tables, charts, empty states, navigation, cards, alerts, or side…
react-hook-form
supabase
React Hook Form का सही उपयोग monorepo में कहीं भी — डेटा फ्लो, सब्सक्रिप्शन, रीसेट, डर्टी स्टेट, नंबर इनपुट, और कंट्रोल्ड इनपुट नियम। इसे लोड करें…
studio-queries
supabase
React Query के डेटा लाने के तरीके Supabase Studio में। क्वेरी हुक, म्यूटेशन हुक, या apps/studio/data/ — में क्वेरी कुंजियाँ लिखते या समीक्षा करते समय उपयोग करें…