RadioGroupFixture Class — react Architecture
Architecture documentation for the RadioGroupFixture class in RadioGroupFixture.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD ad51d421_98b0_391c_3898_ec8bb31d48bb["RadioGroupFixture"] a6b5f2e2_eaaa_06e3_727c_a40bd7e187ce["RadioGroupFixture.js"] ad51d421_98b0_391c_3898_ec8bb31d48bb -->|defined in| a6b5f2e2_eaaa_06e3_727c_a40bd7e187ce fa952563_761b_86ee_e5f9_dc978ecb448a["constructor()"] ad51d421_98b0_391c_3898_ec8bb31d48bb -->|method| fa952563_761b_86ee_e5f9_dc978ecb448a 742cae6d_7971_ff67_8123_1c19cc30982f["render()"] ad51d421_98b0_391c_3898_ec8bb31d48bb -->|method| 742cae6d_7971_ff67_8123_1c19cc30982f
Relationship Graph
Source Code
fixtures/dom/src/components/fixtures/input-change-events/RadioGroupFixture.js lines 4–55
class RadioGroupFixture extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
changeCount: 0,
};
}
handleChange = () => {
this.setState(({changeCount}) => {
return {
changeCount: changeCount + 1,
};
});
};
handleReset = () => {
this.setState({
changeCount: 0,
});
};
render() {
const {changeCount} = this.state;
const color = changeCount >= 3 ? 'green' : 'red';
return (
<Fixture>
<label>
<input
defaultChecked
name="foo"
type="radio"
onChange={this.handleChange}
/>
Radio 1
</label>
<label>
<input name="foo" type="radio" onChange={this.handleChange} />
Radio 2
</label>{' '}
<p style={{color}}>
<code>onChange</code>
{' calls: '}
<strong>{changeCount}</strong>
</p>
<button onClick={this.handleReset}>Reset count</button>
</Fixture>
);
}
}
Domain
Source
Frequently Asked Questions
What is the RadioGroupFixture class?
RadioGroupFixture is a class in the react codebase, defined in fixtures/dom/src/components/fixtures/input-change-events/RadioGroupFixture.js.
Where is RadioGroupFixture defined?
RadioGroupFixture is defined in fixtures/dom/src/components/fixtures/input-change-events/RadioGroupFixture.js at line 4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free