The "children as a slot" pattern for Rule 3 is the one thing I wish got taught earlier, most people find it by accident after fighting the "Server Component became a Client Component" error for a while. One case I'd add to the practical example section: useOptimistic paired with a Server Action for the AddToCartButton. Right now the button just sits in "Adding..." until the fetch resolves, but useOptimistic lets you flip the UI state instantly while the Server Action runs in the background, then reconciles if it fails. Feels like the natural next step once someone has the basic Server Action wiring down from this guide.
That’s a really good addition. useOptimistic fits naturally as the next step after getting the basic Server Action flow working, especially for cart-style interactions where the UI should feel instant. I’ll definitely consider adding it to the practical example. Thanks for the thoughtful suggestion!
Tarun Sharma
React.js Frontend Web Developer | Next.js Specialist
The "children as a slot" pattern for Rule 3 is the one thing I wish got taught earlier, most people find it by accident after fighting the "Server Component became a Client Component" error for a while. One case I'd add to the practical example section: useOptimistic paired with a Server Action for the AddToCartButton. Right now the button just sits in "Adding..." until the fetch resolves, but useOptimistic lets you flip the UI state instantly while the Server Action runs in the background, then reconciles if it fails. Feels like the natural next step once someone has the basic Server Action wiring down from this guide.