repro-no-declarations-in-reactive-scope-with-early-return.js — react Source File
Architecture documentation for repro-no-declarations-in-reactive-scope-with-early-return.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
// @enableAssumeHooksFollowRulesOfReact @enableTransitivelyFreezeFunctionExpressions @enablePreserveExistingMemoizationGuarantees:false @validateExhaustiveMemoizationDependencies:false
function Component() {
const items = useItems();
const filteredItems = useMemo(
() =>
items.filter(([item]) => {
return item.name != null;
}),
[item]
);
if (filteredItems.length === 0) {
// note: this must return nested JSX to create the right scope
// shape that causes no declarations to be emitted
return (
<div>
<span />
</div>
);
}
return (
<>
{filteredItems.map(([item]) => (
<Stringify item={item} />
))}
</>
);
}
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does repro-no-declarations-in-reactive-scope-with-early-return.js do?
repro-no-declarations-in-reactive-scope-with-early-return.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 repro-no-declarations-in-reactive-scope-with-early-return.js?
repro-no-declarations-in-reactive-scope-with-early-return.js defines 1 function(s): Component.
Where is repro-no-declarations-in-reactive-scope-with-early-return.js in the architecture?
repro-no-declarations-in-reactive-scope-with-early-return.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-no-declarations-in-reactive-scope-with-early-return.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