760 B
760 B
React Compiler and Manual Memoization
createKriNextConfigenablesreactCompiler: trueunless the project overrides it; confirm the effective configuration.- When enabled, rely on React Compiler instead of adding
useMemo,useCallback, orReact.memoas a routine performance precaution. - Use manual memoization only for required reference stability, an Effect or third-party contract, compiler-incompatible code, or a measured performance problem.
- Preserve existing memoization unless approved and verified for removal.
- Use
"use memo"or"use no memo"only for a documented compiler boundary.