feat(react-best-practices): add Server Action & Form pattern rules - #192
Open
mvanhorn wants to merge 1 commit into
Open
feat(react-best-practices): add Server Action & Form pattern rules#192mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
|
@mvanhorn is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Add 5 new rules covering Server Action and Form patterns: - server-useoptimistic: instant UI feedback with useOptimistic (HIGH) - server-action-revalidation: granular cache invalidation (HIGH) - server-action-error-handling: return error state, don't throw (MEDIUM-HIGH) - server-progressive-enhancement: forms that work without JS (MEDIUM) - rerender-useformstatus: pending state without prop drilling (MEDIUM) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mvanhorn
force-pushed
the
osc/feat-server-action-form-rules
branch
from
August 14, 2026 04:00
d08178b to
dfca54d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 5 new rules to the Server-Side Performance and Re-render Optimization categories covering Server Action and Form patterns.
New rules
server-useoptimistic- Use useOptimistic for instant UI feedback on mutations (HIGH)server-action-revalidation- Granular cache revalidation after mutations (HIGH)server-action-error-handling- Return error state instead of throwing (MEDIUM-HIGH)server-progressive-enhancement- Forms that work without JavaScript (MEDIUM)rerender-useformstatus- Pending state via useFormStatus without prop drilling (MEDIUM)Why these rules
The skill has 8
server-rules but only server-auth-actions.md touches Server Actions directly (covering authentication). Server Actions are the primary mutation mechanism in Next.js App Router, and the patterns above are the most common sources of bugs and poor UX:revalidatePath('/')instead of granularrevalidateTagafter mutationsEach rule follows the existing
_template.mdformat with incorrect/correct TypeScript examples and references to React/Next.js docs.Complements PR #62 (useActionState) - these rules cover different aspects of the Server Action lifecycle.
Changes
skills/react-best-practices/rules/This contribution was developed with AI assistance (Claude Code).