Skip to content

Instantly share code, notes, and snippets.

View tinhnguyen-ea's full-sized avatar
🙈
This is not a creative status

Tinh Nguyen tinhnguyen-ea

🙈
This is not a creative status
  • East Agile Vietnam
  • Vietnam
View GitHub Profile
@tinhnguyen-ea
tinhnguyen-ea / ReactBindingApproaches.js
Created October 20, 2016 00:34 — forked from coryhouse/ReactBindingApproaches.js
React Binding Approaches
// Approach 1: Use React.createClass
var HelloWorld = React.createClass({
getInitialState() {
return { message: 'Hi' };
},
logMessage() {
// this magically works because React.createClass autobinds.
console.log(this.state.message);
},