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, read the files under rules/

supabase की और Skills

studio-mock-api-tests
supabase
सुपाबेस स्टूडियो के लिए घटक परीक्षण जो MSW के साथ नेटवर्क स्तर पर API अनुरोधों का मॉक करते हैं। किसी React घटक का परीक्षण लिखते या समीक्षा करते समय उपयोग करें...
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 सामग्री लिखें, संपादित करें, व्यवस्थित करें और समीक्षा करें — गाइड, व्याख्याकार, ट्यूटोरियल, समस्या निवारण प्रविष्टियाँ, संदर्भ दस्तावेज़, और…
react-hook-form
supabase
React Hook Form का सही उपयोग monorepo में कहीं भी — डेटा फ्लो, सब्सक्रिप्शन, रीसेट, डर्टी स्टेट, नंबर इनपुट, और कंट्रोल्ड इनपुट नियम। इसे लोड करें…
review-the-docs
supabase
Supabase डॉक्स परिवर्तनों की स्थानीय रूप से ~/GitHub/supabase/supabase में समीक्षा करें — या तो एक खुला PR (ट्रायेज, वर्गीकरण, सत्यापन) या PR खोलने से पहले अपनी खुद की शाखा (स्थानीय…
ask-the-docs
supabase
प्रलेखित आर्किटेक्चर, बिल्ड पाइपलाइन और समीक्षा-पैटर्न नोट्स का उपयोग करके Supabase docs ऐप (apps/docs) के बारे में प्रश्नों के उत्तर दें, और फीचर-डिज़ाइन लागू करें…
write-the-docs
supabase
किसी फीचर या लॉन्च के लिए नया या अपडेटेड Supabase docs कंटेंट तैयार करें, जो Linear (टिकट और उसके product/PM संदर्भ), वास्तविक कोड के पठन, और… पर आधारित हो।