class GuGuDan extends React.Component {
constructor(props) {
super(props);
this.state = {
x: Math.ceil(Math.random() * 9),
y: Math.ceil(Math.random() * 9),
value: '',
result: '',
}
}
}
class GuGuDan extends React.Component {
state = {
x: Math.ceil(Math.random() * 9),
y: Math.ceil(Math.random() * 9),
value: '',
result: '',
}
}
render() {
return (
<React.Fragment>
<p>{this.state.x} 곱하기 {this.state.y}는?</p>
<div>{this.state.result}</div>
</React.Fragment>
);
}
cf.Zerocho