# React Best Practices

> Use when writing, reviewing, or refactoring React or Next.js UI. Vercel Engineering performance rules: kill waterfalls, shrink bundles, then tune rendering.

- Skill: `shixuuu/react-best-practices` (Agent Skill)
- Install (CLI): `npx get-skill add shixuuu/react-best-practices`
- Raw SKILL.md: https://api.skillmd.com/api/skills/shixuuu/react-best-practices/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: Shixuuu (https://skillmd.com/u/shixuuu)
- Updated: 2026-11-24
- Page: https://skillmd.com/skills/shixuuu/react-best-practices

---


# Vercel React best practices

Apply when writing or reviewing React, Next.js, or TanStack Start UI. Priority: kill waterfalls, shrink bundles, then server performance, client fetching, re-renders, rendering, JS hot paths.

Kill waterfalls: check cheap sync conditions first, Promise.all independent work, start promises early, await late.

Shrink the bundle: no barrel index imports, dynamic-import heavy components, load feature modules only when on.

On this stack, prefer Convex queries / TanStack Query over ad-hoc fetch in effects.

Re-renders: do not subscribe to state only used in callbacks, hoist default non-primitive props, never define components inside components.

Review order: accidental waterfalls, barrel imports, over-fetch to the client, effects that should be derived state, inline component definitions.

