Replies: 1 comment
-
|
+1 on this! Also, suggesting a modular approach This is a fantastic proposal. The amount of time the community wastes rewriting the exact same To build on your open questions, I think the biggest hurdle here is framework fragmentation. "Modern React" looks different depending on the meta-framework you're using (e.g., Server Components in Next.js vs. a standard Vite SPA). A Suggestion: Modular Skill Packs If the React team takes this on, it might be best to structure it modularly so agents understand the exact environment they are working in:
Regarding Versioning: Tying it to major React versions (like I'd love to see this turn into a formal RFC. Count me in if you need a hand drafting the initial markdown rules for the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The Chrome team recently shipped Modern Web Guidance — a set of expert-vetted skills that AI coding agents (Claude Code, Copilot CLI, Cursor, etc.) load to write accessible, performant, modern web code. One install command, works across agents, maintained by the team that owns the source of truth.
I'd love to see an equivalent from the React team.
The problem
AI coding agents have become a primary author of React code, and they're systematically biased toward outdated patterns from their training data:
useState+useEffectfor data fetching instead of Suspense +use()useMemo/useCallbackeverywhere — even on projects with React Compiler enabledforwardRefin new code (deprecated in React 19;refis now a normal prop)useEffectfor things that aren't effects — the classic you might not need an effect footgun"use client"by default in RSC-aware frameworks<form action>+useActionState+useFormStatus+useOptimisticContext.Providerinstead of just<Context>(React 19)useOptimistic/useTransition/useDeferredValueEvery team ends up writing the same
CLAUDE.md/.cursorrules/AGENTS.mdto patch around this. The guidance is real, stable, and canonical enough that it shouldn't have to be re-derived in every repo.The proposal
A
modern-react-guidanceskill pack maintained or blessed by the React team, distributable through the same channels Modern Web Guidance already uses:npx skills add facebook/modern-react-guidance(Vercel Agent Skills)/plugin install modern-react-guidance(Claude Code, Copilot CLI)Suggested skill categories
Author new components correctly
use()+ Suspense for data fetching where appropriateuseActionState,useFormStatus,useOptimisticrefas a normal prop; noforwardRefin new codeuseTransitionvsuseDeferredValueDon't write effects you don't need
Trust React Compiler
useMemo/useCallbackeslint-plugin-react-hooks/ the Compiler linterServer Components & Actions (framework-agnostic)
"use client"only when necessary, with a concrete checklistModernize legacy React
forwardRef→ ref-as-propuse(Context)Concurrent UX
Why the React team specifically
Modern Web Guidance works because Chrome owns the source of truth on what "modern web" means. The React team is the only entity that can authoritatively say "this is the current best practice" without it becoming yet another opinionated third-party lint pack. Without an official version, every framework, lint vendor, and platform team will ship their own — and they'll disagree, and agents will keep writing 2019-era React.
Open questions
Happy to help draft the first skills if there's appetite — posting here to see if it's worth a formal RFC.
Beta Was this translation helpful? Give feedback.
All reactions