Foo() — react Function Reference
Architecture documentation for the Foo() function in infer-function-uncond-optional-hoists-other-dep.tsx from the react codebase.
Entity Profile
Dependency Diagram
graph TD 2afcca8f_f41c_aecd_e508_568749234d98["Foo()"] 4e471695_bf96_83f6_b680_1e6bdd406636["infer-function-uncond-optional-hoists-other-dep.tsx"] 2afcca8f_f41c_aecd_e508_568749234d98 -->|defined in| 4e471695_bf96_83f6_b680_1e6bdd406636 style 2afcca8f_f41c_aecd_e508_568749234d98 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/infer-function-uncond-optional-hoists-other-dep.tsx lines 5–14
function Foo({a, cond}) {
// Assume fn can be uncond evaluated, so we can safely evaluate a.b?.c.<any>
const fn = () => [a, a.b?.c.d];
useIdentity(null);
const arr = makeArray();
if (cond) {
arr.push(identity(a.b?.c.e));
}
return <Stringify fn={fn} arr={arr} shouldInvokeFns={true} />;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does Foo() do?
Foo() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/infer-function-uncond-optional-hoists-other-dep.tsx.
Where is Foo() defined?
Foo() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/infer-function-uncond-optional-hoists-other-dep.tsx at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free