/*prettydiff.com spaceclose:false, varword:list*/ var ListItem = React.createClass({ render: function () { return (
  • this.props.item.name
  • ); } }), List = React.createClass({ render : function () { return ; }, renderList: function () { return this .props .items .map(function (item) { return ; }); } }), Mist = React.createClass({ renderList: function () { return this .props .items .map(function (item) { return {item}} key={item.id}/>; }); } }), content = ( ), qwer = A dropdown list Do Something Do Something Fun! Do Something Else ; render(dropdown); // JSX var box = { shouldShowAnswer(user) ? no : Text Content } , a = function () { return asdf; }, HelloMessage = React.createClass({ render: function () { return
    Hello {this.props.name}
    ; } }); React.render(, mountNode); var Timer = React.createClass({ componentDidMount : function () { this.interval = setInterval(this.tick, 1000); }, componentWillUnmount: function () { clearInterval(this.interval); }, getInitialState : function () { return {secondsElapsed: 0}; }, render : function () { return (
    Seconds Elapsed: {this.state.secondsElapsed}
    ); }, tick : function () { this.setState({ secondsElapsed: this.state.secondsElapsed + 1 }); } }); React.render(, mountNode); var Timer = React.createClass({ componentDidMount : function () { this.interval = setInterval(this.tick, 1000); }, componentWillUnmount: function () { clearInterval(this.interval); }, getInitialState : function () { return {secondsElapsed: 0}; }, render : function () { return (
    Seconds Elapsed: {this.state.secondsElapsed}
    ); }, tick : function () { this.setState({ secondsElapsed: this.state.secondsElapsed + 1 }); } }); React.render(, mountNode); var TodoList = React.createClass({ render: function () { var createItem = function (itemText) { return
  • {itemText}
  • ; }; return
      { this .props .items .map(createItem) }
    ; } }), TodoApp = React.createClass({ getInitialState: function () { return {items: [], text: ""}; }, handleSubmit : function (e) { e.preventDefault(); var nextItems = this .state .items .concat([this.state.text]), nextText = ""; this.setState({items: nextItems, text: nextText}); }, onChange : function (e) { this.setState({text: e.target.value}); }, render : function () { return (

    TODO

    ); } }); React.render(, mountNode); var converter = new Showdown.converter(), MarkdownEditor = React.createClass({ getInitialState: function () { return {value: "Type some *markdown* here!"}; }, handleChange : function () { this.setState({ value: this .refs .textarea .getDOMNode() .value }); }, render : function () { return (

    Input