I am working in a project with reactjs. By react code run successfully but unable to parse some tag. My code is
var Item = React.createClass({ render: function () { var proDiscount; if(this.props.discount!=0){ proDiscount = '<span>'+this.props.discount+'</span>'; }else{ proDiscount = ''; } return ( <div className="item"> <div className="tag">{this.props.price} {proDiscount}</div> </div> ); } }); When it render the <span> tag unable to parse. The output keep span tag as it is, rest of the output is fine. Where is my problem Thank you.