#How can we make a div content optional?
1 messages · Page 1 of 1 (latest)
Could do something like...
{title && <h1>{title}</h1>}
and what if we need to add some more p tags ?
from where it is getting the data
Not sure I understand exactly, but you can wrap a check around multiple elements.
I tried with image in this way but the image is not showing up
Is this right ?
I don't believe the parenthesis around the image tag should be there.
image is also optional sometimes it shows blank space
Not getting how
What does {image} return?
So in the 2nd screenshot, does image, alt and classes return data if you write them out separately?
that all are optional i can add the data