Back to prompts
Find props and state patterns that cause unnecessary re-renders. Detect: - Inline object/array props - Unstable callbacks - Overuse of Context for frequently changing values Refactor: - Stabilize references with useMemo/useCallback. - Memoize expensive leaf components where appropriate.
Related Prompts
View alluseEffect Best Practices Refactor
You are a senior React engineer. Refactor the provided React/Next.js codebase to follow strict useEf...
ReactuseEffect
Tree-Shaking & Bundle Size Optimization
You are a senior frontend performance engineer. Objective: Identify and fix tree-shaking and bundle...
PerformanceBundle Size
Over-fetching & Network Waste
Scan the repository for duplicated fetch logic, over-fetching, and missing deduplication. Refactor:...
NetworkPerformance
N+1 Queries & Fan-Out Explosions
Scan for code paths where a single request can trigger linear or unbounded database queries, API cal...
PerformanceDatabase