Component() — react Function Reference
Architecture documentation for the Component() function in allow-mutating-ref-in-callback-passed-to-jsx-indirect.tsx from the react codebase.
Entity Profile
Dependency Diagram
graph TD f2c29118_257e_4c9b_287d_97eb08f6613f["Component()"] 83fc8365_c1ee_1853_a2f3_cd5fafdf727e["allow-mutating-ref-in-callback-passed-to-jsx-indirect.tsx"] f2c29118_257e_4c9b_287d_97eb08f6613f -->|defined in| 83fc8365_c1ee_1853_a2f3_cd5fafdf727e style f2c29118_257e_4c9b_287d_97eb08f6613f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-mutating-ref-in-callback-passed-to-jsx-indirect.tsx lines 4–23
function Component() {
const ref = useRef(null);
const setRef = () => {
if (ref.current !== null) {
ref.current = '';
}
};
const onClick = () => {
setRef();
};
return (
<>
<input ref={ref} />
<button onClick={onClick} />
</>
);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does Component() do?
Component() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-mutating-ref-in-callback-passed-to-jsx-indirect.tsx.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-mutating-ref-in-callback-passed-to-jsx-indirect.tsx at line 4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free