Receber por email
← Voltar para o catálogo

mk:react-patterns

Use when writing, reviewing, or optimizing React/Next.js code. Triggers on .tsx/.jsx files, React component work, Next.js routes, bundle optimization, re-render issues, or performance improvements. Auto-activates alongside mk:typescript when React project detected.

15estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add ngocsangyem/MeowKit

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/mk-react-patterns/svg)](https://www.skillteca.com.br/skills/mk-react-patterns)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

React Patterns

React and Next.js performance optimization — curated rules across priority categories drawn from framework docs and production practice.

Complements mk:typescript (type safety) and mk:vue (Vue patterns). This skill covers React-specific performance patterns.

When to Use

  • Writing or reviewing React/Next.js components
  • Optimizing bundle size or render performance
  • Fixing re-render issues
  • Server vs client component decisions
  • Data fetching patterns

Rule Categories (by priority)

Load the relevant reference when working in that area:

| Priority | Category | Reference | Key rules | | -------- | ---------------------- | ------------------------------------- | ----------------------------------------------------- | | CRITICAL | Eliminating waterfalls | references/async-patterns.md | Defer await, parallel promises, Suspense boundaries | | CRITICAL | Bundle size | references/bundle-optimization.md | No barrel imports, dynamic imports, defer third-party | | HIGH | Server performance | references/server-patterns.md | React.cache(), LRU cache, parallel fetching, after() | | MEDIUM | Re-render optimization | references/rerender-optimization.md | Derived state, functional setState, memo, transitions | | MEDIUM | Rendering perf | references/rendering-patterns.md | content-visibility, hoist JSX, conditional render |

Process

  1. Identify the performance concern (waterfall? bundle? re-render? server?)
  2. Load the matching reference file
  3. Apply rules — each rule has: problem, solution, code example
  4. Verify improvement (Lighthouse, bundle analyzer, React DevTools)

Gotchas

  • Premature optimization: optimizing re-renders before measuring → measure first with React DevTools Profiler
  • Over-memoizing: wrapping everything in useMemo/React.memo → memo only when profiler shows expensive re-renders
  • Barrel file trap: importing from index.ts pulls entire module → always import directly from source file

Workflow Integration

Auto-activates during Phase 3 (Build) when React/Next.js project detected. Loaded by developer agent alongside mk:typescript.

Compartilhar X LinkedIn