I'm using React library and I want to insert a text with <br>
text inside a html element.
var FinancialOverviewRow = React.createClass({
render: function() {
return (
<tr>
{
this.props.data.map(function(val, index) {
jsx = <div>{val}</div>;
return (<td className={fields[index].classname} key={key}>
{jsx}
</td>);
})
}
</tr>
);
}
});
But here the val
is a text which sometimes includes <br>
. How can I format it somehow that I really use this tag as a HTML tag ?
All the solutions I've seen somehow use jQuery which I don't.