<div>
<h4 style="cursor:pointer" onClick="()=>this.toggle()">Click to {this.state.open ? 'close' : 'open'}</h4>
<p style="display:{this.state.open?'block':'none'}">This is my paragraph. It opens and closes</p>
</div>