I have one component which is going to display Array of String. The code looks like this:
React.createClass({ render() { this.props
Using es6 you could do something like:
const joinComponents = (accumulator, current) => [ ...accumulator, accumulator.length ? ', ' : '', current ]
And then run:
listComponents .map(item => {item.t} ) .reduce(joinComponents, [])