SkillsReviewed · Vercel Labs

Vercel React Best Practices

Vercel React Best Practices is a reusable performance guide for AI coding assistants and React or Next.js developers, but some rules contain conflicting explanations or behavior-changing examples. Its 70 rules prioritize unnecessary waits and bundle size before rendering and JavaScript optimizations.

Researched 12 Nov 2026

In short.

Vercel React Best Practices is a performance instruction skill for AI coding assistants and React or Next.js developers, but its examples need review for correctness and framework compatibility. It provides 70 rules across eight categories, with explanations and before-and-after code. Its strongest feature is the emphasis on overlapping independent requests and reducing initial JavaScript. Conflicting useEffectEvent explanations and a behavior-changing flatMap rewrite limit its suitability for automatic application without review. Runtime correctness, assistant adherence and application-specific performance gains are not assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is limited to the supplied react-best-practices folder at revision 1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62: SKILL.md, AGENTS.md, README.md, metadata.json, section metadata, the rule template and the individual rule files. SKILL.md supplies an MIT declaration; no standalone licence text or copyright notice is included. Linked reference pages and other repository folders are excluded. The README mentions build scripts and generated evaluation cases whose contents are not supplied. Nothing was executed, and correctness across supported environments, performance gains and assistant adherence remain unassessed.

The overview

identity

The skill is named vercel-react-best-practices and is attributed to Vercel Engineering, with author metadata identifying vercel. Its declared version is 1.0.0. The README credits its original creation to @shuding at Vercel.

The original resource is the react-best-practices folder in vercel-labs/agent-skills [https://github.com/vercel-labs/agent-skills/tree/main/skills/react-best-practices]. The supplied snapshot is tied to revision 1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62.

assessment

This is useful as a structured reference when an assistant writes, reviews or refactors a React application. It gives concrete patterns to look for and puts larger architectural opportunities, such as independent requests waiting unnecessarily, ahead of small loop optimizations.

Its value is strongest when a developer can judge whether an example preserves the application's behavior. The supplied rules contain identifiable inconsistencies, so their priority labels should guide investigation rather than justify accepting every suggested rewrite.

users

The intended users are AI agents and language models maintaining, generating or refactoring React and Next.js code. Developers can also use the material directly for performance reviews and to explain requested changes to an assistant.

Beginners get paired examples that explain common mistakes, but the guide assumes familiarity with components, hooks and asynchronous JavaScript. Experienced developers get more specialized material on React Server Components, request caching, serialization, streaming and build-tool analysis. It is a focused optimization reference rather than a complete introduction to React.

capabilities

The eight categories cover async waterfalls, bundle size, server performance, client data fetching, re-renders, browser rendering, JavaScript performance and advanced hook patterns. Waterfalls are unnecessary sequences in which one operation waits for another despite being able to start independently.

Specific guidance includes Promise.all(), dependency-aware fetching, Suspense boundaries, lazy component loading, explicit import paths, request deduplication, smaller server-to-client props, derived state and immutable sorting. The server rules also address authentication inside Server Actions and avoiding shared mutable request data.

Using it

requirements

Practical use requires a React or Next.js project and enough understanding to distinguish browser code, server code and genuine data dependencies. Some examples use SWR, better-all or lru-cache; these are dependencies of particular patterns rather than requirements for every rule. The dependency-parallelization rule also provides a native Promise alternative.

There is no complete compatibility matrix or supported-assistant list. Examples reference Activity, useEffectEvent, Next.js after() and React Compiler, so feature availability needs checking against the actual project. The guide acknowledges that React Compiler can make some manual memoization and JSX hoisting unnecessary.

mechanism

The resource works through written instructions and examples. SKILL.md supplies the purpose, suggested task triggers and rule index; individual files explain each pattern; AGENTS.md is the compiled guide. The material does not itself provide evidence of automatic code inspection or enforcement.

Rule files use structured metadata for titles, impact and tags, followed by rationale and incorrect/correct examples. Category priorities run from CRITICAL for waterfalls and bundle size to LOW for advanced patterns, while individual rules can carry different impact ratings.

setup

For reference use, start with SKILL.md and follow its rule paths, or read the expanded AGENTS.md. The captured entry file is available at its original immutable address [https://raw.githubusercontent.com/vercel-labs/agent-skills/1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62/skills/react-best-practices/SKILL.md]. The supplied files do not specify an assistant-specific installation command or discovery location.

For maintaining the guide, the README documents pnpm install, pnpm build, pnpm validate and pnpm extract-tests. These are authoring commands. Their script implementations, dependency manifests and generated evaluation cases are not supplied, so their behavior and results are unknown.

example

The API-route example begins with three sequential steps: authenticate, fetch configuration, then fetch user data. Its rewrite starts authentication and configuration together, waits for the authenticated session, and then waits for configuration and user data through Promise.all().

This preserves the shown dependency of user data on the session while allowing configuration to overlap with other work. It illustrates the skill's central scheduling idea; no route was executed and no speedup was measured.

Assessment & evidence

limitations

The Effect Event guidance contradicts itself. advanced-effect-event-deps.md says useEffectEvent results change identity on every render, while advanced-event-handler-refs.md describes a stable function reference. The supplied explanations do not resolve that conflict.

The flatMap rewrite changes behavior for some inputs. In the original example, filter(Boolean) removes an active user's empty-string name; the replacement retains that name. This is a semantic difference visible in the code, independent of any performance claim.

The useTransition search example contains no fetch cancellation or stale-response guard, despite prose claiming that new transitions automatically cancel pending ones. Request cancellation and response ordering are therefore not established by that example.

reasoning

The ordering gives developers a useful starting point: first examine avoidable waiting and unnecessary code loading, then investigate rendering and smaller computations. That is a prioritization aid; the actual bottleneck still determines which rule matters.

Several rules explicitly recognize tradeoffs. Suspense can show surrounding content sooner but introduce layout shift. Static module-level I/O is distinguished from unsafe shared request data. Manual memoization is qualified by React Compiler support, and simple primitive expressions are discouraged from unnecessary useMemo wrapping. These qualifications are reasons to read the expanded rules rather than apply the quick-reference lines alone.

alternatives

The guide points to React documentation [https://react.dev], Next.js documentation [https://nextjs.org] and SWR documentation [https://swr.vercel.app]. These are relevant places to investigate API-specific questions, but their linked contents are outside the supplied evidence and no comparative assessment is established.

For partial async dependencies, the resource itself offers explicit Promise chaining and Promise.all() as an alternative to adding better-all. The expanded AGENTS.md can also be read directly by a developer without relying on an assistant to interpret the skill.

evidence

The supplied evidence consists of the skill entry, compiled guide, individual rules, README, metadata and rule-authoring files from one Git revision. It supports conclusions about the written guidance and visible code examples. No code was executed; runtime correctness, assistant reliability and application-specific gains remain unassessed.

Figures such as the claimed 2–10× async improvements are source claims. The supplied files do not provide reproducible benchmark conditions or measurements for a target application, and the linked supporting pages are excluded.

The compiled and individual forms differ in useful detail. For example, bundle-barrel-imports.md includes optimizePackageImports configuration that is absent from the corresponding compiled example. This makes the individual rule worth consulting before implementing that recommendation.

Access & freshness

costs

The supplied material states no resource price, subscription fee or paid-service requirement. Costs for a chosen coding assistant, hosting or developer review are unspecified.

There are no measured token costs, implementation costs or financial savings. The performance impact figures do not establish a financial return for a particular application.

rights

SKILL.md declares an MIT licence. Its metadata identifies vercel as author, and the README acknowledges @shuding at Vercel.

No standalone licence text or copyright notice is supplied. The declaration establishes the stated licence label, but applicable repository-level notices and their coverage are unknown. Obtain and preserve the applicable licence and notices before redistributing the original files.

freshness

The guide and metadata identify version 1.0.0 and January 2026. The supplied snapshot was captured on 11 November 2026 at revision 1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62.

These findings apply to that revision. The current main branch, later corrections and compatibility with later React or Next.js releases are unknown. The declared document date does not establish when every individual rule was last verified.

actions

Start with a concrete issue, such as sequential independent requests or an editor loading in the initial bundle. Read the relevant individual rule, confirm the project's API support, and ask the assistant to explain dependencies and behavior changes before accepting a rewrite.

Check the proposed change against real inputs and measure the affected application behavior. Pay particular attention to empty values in array rewrites, request ordering in search, cache scope and server/client boundaries. Resolve the conflicting Effect Event explanations against the documentation for the project's React version before adopting those patterns.

Acquire the original skill files from the stated source and retain the revision together with applicable licence text and notices.

Evidence for this report

skills/react-best-practices/AGENTS.mdselected · checked 2026-11-11
skills/react-best-practices/README.mdselected · checked 2026-11-11
skills/react-best-practices/SKILL.mdselected · checked 2026-11-11
skills/react-best-practices/metadata.jsonselected · checked 2026-11-11