Skip to content

Instantly share code, notes, and snippets.

@sickill
Last active Aug 29, 2015
Embed
What would you like to do?
var Line = React.createClass({
render: function() {
return <span className="line">{this.props.text}</span>;
}
});
var Terminal = React.createClass({
render: function() {
var lines = this.props.lines.map(function(line) {
return <Line text={line} />; # how to add a new-line character after this?
});
return <pre className="terminal">{lines}</pre>;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment