#Smartest tactic for showing section only when there is content?

5 messages · Page 1 of 1 (latest)

somber solar
#

Edit: SOLVED

I'm trying to show the div containing the description if the data is available as seen in the image. Still a beginner to the ecosystem, I'm trying to grapple the syntax for weaving in and out of code and html. I've done stuff like this before on other platforms, so I think I just need a nudge on a good way to test inline if content exists, and only show the section if so.

#

I get "unexpected if" error on the above

karmic fractal
#
{ thing && <div></div> }
turbid raptor
#

Have you tried { work.description && <p></p> }

karmic fractal