- Home
- Skills
- Srbhr
- Resume Matcher
- React Patterns
react-patterns_skill
- TypeScript
26.1k
GitHub Stars
2
Bundled Files
3 weeks ago
Catalog Refreshed
2 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstart where the catalogue uses aiagentskills.
npx veilstart add skill srbhr/resume-matcher --skill react-patterns- REACT_PATTERNS.md4.8 KB
- SKILL.md3.2 KB
Overview
This skill distills Vercel Engineering’s React and Next.js performance patterns into a practical, offline-focused guide for local and Docker deployments. It emphasizes eliminating async waterfalls, shrinking client payloads, and keeping UIs responsive without relying on hosted edge features. The guidance is tuned for cold-starts, in-process caching, and reduced memory use in persistent server processes.
How this skill works
The skill inspects common performance anti-patterns and prescribes concrete fixes: parallelizing async work, using Suspense boundaries for streaming, minimizing RSC serialization, and caching hot server work. It recommends bundle and import strategies, client-side rendering controls, and small-surface server props to reduce hydration cost. Patterns are prioritized so you can apply the highest-impact changes first.
When to use it
- Building or refactoring React components and Next.js pages for local or containerized deployment
- Diagnosing slow startup, long hydration times, or sluggish UI interactions
- Implementing Server Actions, Route Handlers, or local API/database calls
- Reducing memory usage and payload size in persistent server processes
- Reviewing code for performance regressions before release
Best practices
- Avoid sequential awaits: start async work early and await late with Promise.all or helper libraries
- Stream slow sections with Suspense boundaries instead of blocking full-page renders
- Minimize RSC props: pass only required fields and avoid duplicated serialized data
- Use dynamic imports, barrel import hygiene, and conditional loading to cut startup cost
- Cache hot server computations with React.cache per-request and LRU for cross-request reuse
- Reduce client work with memoized subtrees, lazy state initialization, transitions, and content-visibility
Example use cases
- Refactor a Next.js page that blocks on multiple sequential API calls into parallel requests with Suspense fallbacks
- Trim server-to-client payloads for a resume-matching app by serializing only fields needed for initial render
- Add in-process caching in a Docker-deployed service to avoid repeating expensive vector-search or embedding work
- Lower initial bundle size by converting rarely used modules to dynamic imports in a TypeScript app
- Improve perceived responsiveness by converting eager state setup into lazy initialization and transitions
FAQ
Yes. The core patterns—eliminating waterfalls, reducing payloads, and caching hot work—improve performance regardless of environment, though edge-specific optimizations can provide additional wins.
How do I decide between per-request React.cache and an LRU cross-request cache?
Use per-request React.cache for idempotent, cheap memoization tied to a render. Use LRU when work is expensive and safe to share across requests, such as reused embeddings or DB query results.