Initial Reactions (Meetup #1)














(Jump in, ask questions)


/** @jsx React.DOM */
var HelloMessage = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
React.renderComponent(<HelloMessage name="John" />, mountNode);
/** @jsx React.DOM */
var Timer = React.createClass({
getInitialState: function() {
return {secondsElapsed: 0};
},
tick: function() {
this.setState({secondsElapsed: this.state.secondsElapsed + 1});
},
componentDidMount: function() {
this.interval = setInterval(this.tick, 1000);
},
componentWillUnmount: function() {
clearInterval(this.interval);
},
render: function() {
return (
<div>Seconds Elapsed: {this.state.secondsElapsed}</div>
);
}
});
React.renderComponent(<Timer />, mountNode);
return (
React.DOM.div(
null,
"Seconds Elapsed: ",
this.state.secondsElapsed
)
);
<span data-reactid=".1z.$like">
<i class="UFIBlingBoxLikeIcon UFIBlingBoxSprite" data-reactid=".1z.$like.0"></i>
<span class="UFIBlingBoxText" data-reactid=".1z.$like.1">2,095</span>
</span>className: ""
rootid: "u_ps_0_0_38"
shortenTimestamp: true
count: 2095
iconClassName: "UFIBlingBoxLikeIcon"
itemKey: "like"



YOU DON'T HAVE TO COMPETE. MAKE ANYTHING!