MouseEnterDetect Class — react Architecture
Architecture documentation for the MouseEnterDetect class in EnterLeaveEventPlugin-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD f0705fff_1b10_c9f0_b9b5_b61750affb70["MouseEnterDetect"] eb1d846d_1a0d_8598_b424_c4a55d5ba3b1["EnterLeaveEventPlugin-test.js"] f0705fff_1b10_c9f0_b9b5_b61750affb70 -->|defined in| eb1d846d_1a0d_8598_b424_c4a55d5ba3b1 7fe81d1d_408b_f9da_47d7_74cb7cebf8ae["constructor()"] f0705fff_1b10_c9f0_b9b5_b61750affb70 -->|method| 7fe81d1d_408b_f9da_47d7_74cb7cebf8ae 3aff7458_cf6f_407e_75db_d13843b15cf0["componentDidMount()"] f0705fff_1b10_c9f0_b9b5_b61750affb70 -->|method| 3aff7458_cf6f_407e_75db_d13843b15cf0 38876d1c_a321_6eed_bd26_f54a744c4237["render()"] f0705fff_1b10_c9f0_b9b5_b61750affb70 -->|method| 38876d1c_a321_6eed_bd26_f54a744c4237
Relationship Graph
Source Code
packages/react-dom/src/events/plugins/__tests__/EnterLeaveEventPlugin-test.js lines 180–205
class MouseEnterDetect extends React.Component {
constructor(props) {
super(props);
this.firstEl = React.createRef();
this.siblingEl = React.createRef();
}
componentDidMount() {
this.siblingEl.current.dispatchEvent(
new MouseEvent('mouseout', {
bubbles: true,
cancelable: true,
relatedTarget: this.firstEl.current,
}),
);
}
render() {
return (
<React.Fragment>
<div ref={this.firstEl} onMouseEnter={mockFn} />
<div ref={this.siblingEl} />
</React.Fragment>
);
}
}
Source
Frequently Asked Questions
What is the MouseEnterDetect class?
MouseEnterDetect is a class in the react codebase, defined in packages/react-dom/src/events/plugins/__tests__/EnterLeaveEventPlugin-test.js.
Where is MouseEnterDetect defined?
MouseEnterDetect is defined in packages/react-dom/src/events/plugins/__tests__/EnterLeaveEventPlugin-test.js at line 180.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free