error.ref-value-in-event-handler-wrapper.tsx — react Source File
Architecture documentation for error.ref-value-in-event-handler-wrapper.tsx, a tsx file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 57a58ea5_b8da_0eed_1e35_7f19e68b35f1["error.ref-value-in-event-handler-wrapper.tsx"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] 57a58ea5_b8da_0eed_1e35_7f19e68b35f1 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 style 57a58ea5_b8da_0eed_1e35_7f19e68b35f1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @enableInferEventHandlers
import {useRef} from 'react';
// Simulates a handler wrapper
function handleClick(value: any) {
return () => {
console.log(value);
};
}
function Component() {
const ref = useRef(null);
// This should still error: passing ref.current directly to a wrapper
// The ref value is accessed during render, not in the event handler
return (
<>
<input ref={ref} />
<button onClick={handleClick(ref.current)}>Click</button>
</>
);
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{}],
};
Domain
Subdomains
Functions
Dependencies
- react
Source
Frequently Asked Questions
What does error.ref-value-in-event-handler-wrapper.tsx do?
error.ref-value-in-event-handler-wrapper.tsx is a source file in the react codebase, written in tsx. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in error.ref-value-in-event-handler-wrapper.tsx?
error.ref-value-in-event-handler-wrapper.tsx defines 2 function(s): Component, handleClick.
What does error.ref-value-in-event-handler-wrapper.tsx depend on?
error.ref-value-in-event-handler-wrapper.tsx imports 1 module(s): react.
Where is error.ref-value-in-event-handler-wrapper.tsx in the architecture?
error.ref-value-in-event-handler-wrapper.tsx is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.ref-value-in-event-handler-wrapper.tsx (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