import Fixture from '../../Fixture'; const React = window.React; class RadioClickFixture 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 === 0 ? 'green' : 'red'; return ( {' '}

onChange {' calls: '} {changeCount}

); } } export default RadioClickFixture;