due to missing semicolon render method I’m not able get desired output
render () {
return (
<div className="frame">
<CalculatorTitle value="My Calculator" />
<div className="mainCalc">
<OutputScreen question={this.state.question} answer={this.state.answer} />
<div className="button-row">
<Button label={"Clear"} handleClick={this.handleClick} />
<Button label={"Delete"} handleClick={this.handleClick} />
<Button label={"."} handleClick={this.handleClick} />
<Button label={"/"} handleClick={this.handleClick} />
</div>
<div className="button-row">
<Button label={"7"} handleClick={this.handleClick} />
<Button label={"8"} handleClick={this.handleClick} />
<Button label={"9"} handleClick={this.handleClick} />
<Button label={"*"} handleClick={this.handleClick} />
</div>
<div className="button-row">
<Button label={"4"} handleClick={this.handleClick} />
<Button label={"5"} handleClick={this.handleClick} />
<Button label={"6"} handleClick={this.handleClick} />
<Button label={"-"} handleClick={this.handleClick} />
</div>
<div className="button-row">
<Button label={"1"} handleClick={this.handleClick} />
<Button label={"2"} handleClick={this.handleClick} />
<Button label={"3"} handleClick={this.handleClick} />
<Button label={"+"} handleClick={this.handleClick} />
</div>
<div className="button-row">
<Button label={"0"} handleClick={this.handleClick} />
<Button label={"="} handleClick={this.handleClick} />
</div>
</div>
</div>
);
}
2
Answers
Try addding a parent element to the buttons like this
I think your problem might be that you are only allowed to return one parent element, not that you’re missing a semicolon.
What happens if you try it like this?