I would like to use the join() method on a Javascript array, but I would like to join() with an HTML tag.
I want to do something like:
class Page extends React.Component {
render() {
<p>
{this.props.the_form['candidate_ids'].map((val,idx) => {
return this.getCandidateName(val);
}).join('<br/>')}
</p>
}
}
It's escaping the tag and not rendering a new line.
I'm using React, Webpack, and Babel.