HideImage() {
this.setState({
hideImage: '22'
});
}
<p>
<button onClick={this.HideImage}>Hide Iamge</button>
</p>
<p>
<img src={logo} style={{width: "150px"}} />
</p>
const [ showImage, setShowImage ] = useState(true);
<button onClick={() => setShowImage(!showImage)}>click me</button>
{showImage ? <img src="..." /> : null}