Skip to content

Instantly share code, notes, and snippets.

@ku1ik
Last active August 29, 2015 13:57
Show Gist options
  • Save ku1ik/9722700 to your computer and use it in GitHub Desktop.
Save ku1ik/9722700 to your computer and use it in GitHub Desktop.
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