Files
oxc-project__oxc/crates/oxc_react_compiler/fixtures/error.mutate-props-in-distinct-callbacks.js
Boshen 9f3e30088d fix(react_compiler): preserve aliasing diagnostic locations (#24757)
Preserve source-specific labels for aliasing diagnostics while retaining
their shared analysis identity. Previously, interning by place, message,
and help reused the first source location for later effects.

Validated with `just ready` and React ecosystem comparisons.

AI-assisted: Codex was used to implement and validate this change.
2026-07-21 20:21:01 +08:00

13 lines
332 B
JavaScript

function useMutate(document) {
const updateData = useCallback(() => {
document.data = {};
}, [document]);
const updateTitle = useCallback(() => {
document.title = '';
}, [document]);
const updateIcon = useCallback(() => {
document.icon = '';
}, [document]);
return [updateData, updateTitle, updateIcon];
}