function-expression-maybe-mutates-hook-return-value.js — react Source File
Architecture documentation for function-expression-maybe-mutates-hook-return-value.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
function Component(props) {
const id = useSelectedEntitytId();
// this example should infer `id` as mutable, and then infer `onLoad` as mutable,
// and be rejected because onLoad cannot be passed as a frozen value in the JSX.
// however, we likely have to allow this example to work, because hook return
// values are generally immutable in practice and are also widely referenced in
// callbacks.
const onLoad = () => {
log(id);
};
return <Foo onLoad={onLoad} />;
}
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does function-expression-maybe-mutates-hook-return-value.js do?
function-expression-maybe-mutates-hook-return-value.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 function-expression-maybe-mutates-hook-return-value.js?
function-expression-maybe-mutates-hook-return-value.js defines 1 function(s): Component.
Where is function-expression-maybe-mutates-hook-return-value.js in the architecture?
function-expression-maybe-mutates-hook-return-value.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/function-expression-maybe-mutates-hook-return-value.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