mastra-ai avatar

React Best Practices

A solid collection of React performance patterns from Mastra Engineering, organized by impact level so you know what to fix first. The priority system is smart: it pushes you toward eliminating waterfalls and bundle bloat before micro-optimizing re-renders. You get 12 rules across data fetching, bundle optimization, and rendering performance, with the meat living in separate reference files you can grep through. Honestly most useful during code review or refactoring sessions when you need to justify why you're reaching for Promise.all or why barrel imports are slowing things down. The rules are opinionated but backed by concrete patterns like using Tanstack Query for deduplication and startTransition for non-urgent updates.

skills.sh installs
2.8K
GitHub stars
29.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add mastra-ai/mastra --skill react-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Files

React Best Practices

Overview

Routing and priority guide for React performance and quality, containing 27 rules across 9 categories. Rule files hold the detailed explanations, examples, review smells, and impact metrics.

When to Apply

Reference these guidelines when:

  • Writing new React components
  • Implementing data fetching
  • Reviewing code for performance issues
  • Refactoring existing React code
  • Optimizing bundle size or load times

Priority-Ordered Guidelines

Rules are prioritized by impact:

Sponsors

Details

Repository
github.com/mastra-ai/mastra
Categories
Frontend Development, Documentation, Code Review & Quality, Debugging
First seen
May 16, 2026

More from mastra-ai/mastra

All 6
1nexu-io avatardesign-taste-frontendnexu-io/open-designAnti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that d2.8Kskills.sh installs
2hyf0 avatarvue-pinia-best-practiceshyf0/vue-skillsvue pinia best practices2.8Kskills.sh installs
3owl-listener avatarresponsive-designowl-listener/designer-skillsDesign adaptive layouts and interactions that work across all screen sizes and input methods.2.5Kskills.sh installs
4chrisbanes avatarcompose-ui-testing-patternschrisbanes/skillsUse when writing or reviewing Jetpack Compose UI tests, screenshot tests, previews, semantics assertions, fake image loading, keyboard input, focus assertions, 2.5Kskills.sh installs
5alinaqi avatarpwa-developmentalinaqi/claude-bootstrappwa development2.4Kskills.sh installs
6vercel-labs avatarreact-three-fibervercel-labs/json-renderReact Three Fiber 3D renderer for json-render. Use when working with @json-render/react-three-fiber, building 3D scenes from JSON specs, rendering meshes/lights2.4Kskills.sh installs