3 ms·
If you really need to, I don't mind this pattern... {conditional && ( <div>throw whatever you want</div> <div>in here.</span> )}
by mxxx 11y ago
If you really need to, I don't mind this pattern...
{conditional && (
<div>throw whatever you want</div>
<div>in here.</span>
)}
- shuzchen 11y agoOf course, this doesn't actually work, because you have two root elements in that expression. You have to wrap them in an enclosing tag or inject them another way.