Hover Class — react Architecture
Architecture documentation for the Hover class in hover.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 6db9f06c_a10d_0ce4_2572_ae98abdac195["Hover"] 2ca2eb4e_6de0_5f62_cf94_d2d19df563a9["hover.js"] 6db9f06c_a10d_0ce4_2572_ae98abdac195 -->|defined in| 2ca2eb4e_6de0_5f62_cf94_d2d19df563a9 f984d8ff_206f_4a6e_4efa_d7cbbd8d932a["render()"] 6db9f06c_a10d_0ce4_2572_ae98abdac195 -->|method| f984d8ff_206f_4a6e_4efa_d7cbbd8d932a
Relationship Graph
Source Code
fixtures/dom/src/components/fixtures/pointer-events/hover.js lines 6–49
class Hover extends React.Component {
state = {
overs: 0,
outs: 0,
enters: 0,
leaves: 0,
};
onOver = () => this.setState({overs: this.state.overs + 1});
onOut = () => this.setState({outs: this.state.outs + 1});
onEnter = () => this.setState({enters: this.state.enters + 1});
onLeave = () => this.setState({leaves: this.state.leaves + 1});
render() {
const {overs, outs, enters, leaves} = this.state;
return (
<TestCase title="Hover" description="">
<TestCase.Steps>
<li>Hover over the above box and the obstacles</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
Overs and outs should increase when moving over the obstacles but
enters and leaves should not.
</TestCase.ExpectedResult>
<HoverBox
onOver={this.onOver}
onOut={this.onOut}
onEnter={this.onEnter}
onLeave={this.onLeave}
/>
<p>
Pointer Overs: <b>{overs}</b> <br />
Pointer Outs: <b>{outs}</b> <br />
Pointer Enters: <b>{enters}</b> <br />
Pointer Leaves: <b>{leaves}</b> <br />
</p>
</TestCase>
);
}
}
Domain
Source
Frequently Asked Questions
What is the Hover class?
Hover is a class in the react codebase, defined in fixtures/dom/src/components/fixtures/pointer-events/hover.js.
Where is Hover defined?
Hover is defined in fixtures/dom/src/components/fixtures/pointer-events/hover.js at line 6.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free