I am trying to pass a Boolean value to my component so it can show an image depending on if it is true or false but I am not very sure how to proceed here.
Here is the code:
Passing Boolean value to component:
<SomeComponent showImage={false}/>
Trying to use it on component:
const TheImage = showImage => (
<div align="center">
{showImage ? (<img src={ImageIwant} alt="The image i want" width="80%" height="80%" />) : ''}
<p>Here is the image</p>
</div>);
I am new to react an i am not sure why this doesn't work.