hit-box.js — react Source File
Architecture documentation for hit-box.js, a javascript file in the react codebase. 0 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 2f03cb1b_ff7c_7f2b_3a28_70e5f12a2353["hit-box.js"] b06995b9_20f4_1e15_2c5f_cd62c995cb8f["mouse-move.js"] b06995b9_20f4_1e15_2c5f_cd62c995cb8f --> 2f03cb1b_ff7c_7f2b_3a28_70e5f12a2353 a825b817_81db_b4a3_cf60_e048f10d8d05["persistence.js"] a825b817_81db_b4a3_cf60_e048f10d8d05 --> 2f03cb1b_ff7c_7f2b_3a28_70e5f12a2353 style 2f03cb1b_ff7c_7f2b_3a28_70e5f12a2353 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
const React = window.React;
class HitBox extends React.Component {
state = {
x: 0,
y: 0,
};
static defaultProps = {
onMouseMove: n => n,
};
onMove = event => {
this.setState({x: event.clientX, y: event.clientY});
this.props.onMouseMove(event);
};
render() {
const {x, y} = this.state;
const boxStyle = {
padding: '10px 20px',
border: '1px solid #d9d9d9',
margin: '10px 0 20px',
};
return (
<div onMouseMove={this.onMove} style={boxStyle}>
<p>Trace your mouse over this box.</p>
<p>
Last movement: {x},{y}
</p>
</div>
);
}
}
export default HitBox;
Domain
Subdomains
Classes
Imported By
Source
Frequently Asked Questions
What does hit-box.js do?
hit-box.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What files import hit-box.js?
hit-box.js is imported by 2 file(s): mouse-move.js, persistence.js.
Where is hit-box.js in the architecture?
hit-box.js is located at fixtures/dom/src/components/fixtures/event-pooling/hit-box.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/dom/src/components/fixtures/event-pooling).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free