react-fundamentals-19
Installation
SKILL.md
Quick Reference
| Feature | Pattern | Example |
|---|---|---|
| Server Component | Default (no directive) | async function Page() {} |
| Client Component | 'use client' directive |
'use client'; function Counter() {} |
| Server Action | 'use server' directive |
async function submit(formData) {} |
| use() hook | Read promises/context | const data = use(promise) |
| Concept | Syntax |
|---|---|
| Conditional render | {condition && <Component />} |
| List render | {items.map(item => <Item key={item.id} />)} |
| Props destructure | function Card({ title, children }) {} |
| State update | setItems(prev => [...prev, newItem]) |