error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js — react Source File
Architecture documentation for error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR ee8869ab_85c6_3e7c_1e36_17279cafadc5["error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] ee8869ab_85c6_3e7c_1e36_17279cafadc5 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 style ee8869ab_85c6_3e7c_1e36_17279cafadc5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @enablePreserveExistingMemoizationGuarantees @validateRefAccessDuringRender
import {useCallback, useRef} from 'react';
function Component(props) {
const ref = useRef({inner: null});
const onChange = useCallback(event => {
// The ref should still be mutable here even though function deps are frozen in
// @enablePreserveExistingMemoizationGuarantees mode
ref.current.inner = event.target.value;
});
// The ref is modified later, extending its range and preventing memoization of onChange
ref.current.inner = null;
return <input onChange={onChange} />;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{}],
};
Domain
Subdomains
Functions
Dependencies
- react
Source
Frequently Asked Questions
What does error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js do?
error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js is a source file in the react codebase, written in javascript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js?
error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js defines 1 function(s): Component.
What does error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js depend on?
error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js imports 1 module(s): react.
Where is error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js in the architecture?
error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-useCallback-set-ref-nested-property-ref-modified-later-preserve-memoization.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free