Files
oxc-project__oxc/crates/oxc_react_compiler/fixtures/repro-useCallback-local-self-reference.js
Boshen 0bd116abe9 fix(react_compiler): handle local self-references in memo deps (#25524)
Fixes #25049.

Register `DeclareContext` bindings as locals before analyzing nested functions so local self-references are not treated as missing memo dependencies. Skip exhaustive dependency validation when both modes are disabled.

Validation: `just ready`

AI assistance was used to investigate and implement this change.
2026-08-12 04:41:18 +00:00

9 lines
158 B
JavaScript

// @validateExhaustiveMemoizationDependencies
function Component() {
useCallback(() => {
const bar = () => {
console.log(bar);
};
}, []);
}