React Best Practices

Created by Vercel · Frontend

Use Vercel’s React Best Practices when a React or Next.js route feels slow and you need to identify which changes are worth making. On a usage dashboard, trace how the account, chart and table load before starting a refactor.

Install the skill

Run this command from your project folder. Follow the source project’s instructions to complete setup.

npx skills@latest add vercel-labs/agent-skills --skill vercel-react-best-practices
View source project

How to use it

  1. Share the route and the components involved in its initial render. Include a network waterfall, bundle report or profiler recording if available.
  2. Ask the agent to map the dependencies between requests. Identify which requests can run independently and which data needs to be available before rendering.
  3. Make one change at a time, such as deferring a chart library or parallelizing independent reads. Repeat the same measurement with the same data.

Check the result

Record whether the change improved the measured bottleneck. Recheck the loading, empty and error states so the performance work preserves their behavior.