memo-strategy
Installation
SKILL.md
memo-strategy
Guides precise, justified memoization decisions in React — covering when NOT to memoize as much as when to.
Phase 1 — Discover
Before recommending anything, establish:
- Is the re-render actually measured as slow? (profiler, not intuition)
- What triggers the re-render? (parent re-render, context change, state change)
- Are the props stable across renders? (objects/arrays/functions created inline = never stable)
- Is the expensive computation inside render, or just a prop lookup?
Skip this phase only if the user is asking a conceptual question, not debugging a specific component.