if I have code that looks like this...
var Lounge = React.createClass({displayName: "Lounge",
render: function() {
return (
React.createElement("a", {href:"/lounge/detail/" + this.props.id + "/"},
React.createElement("div", {className: "lounge"},
React.createElement("h2", {className: "loungeAuthor"},
this.props.author.name
),
React.createElement("p", {className: "loungeArticle"},
this.props.article
),
React.createElement("img", {className: "loungeImage", src: this.props.image})
)
)
);
}
});
I need to do a logical if check to only render the "img" component if the image data exists. Does anybody know the best way to go about this using React?