Skip to content

Instantly share code, notes, and snippets.

@tomatau
tomatau / MyComponent.js
Last active August 29, 2015 14:17
Click Handler
let MyComponent = React.createClass({
getInitialState(){
return { who: 'world!', unchanged: 'I dont change' };
},
render(){
return (
<span className='hello' onClick={this.handleClick}>
Hello, {this.state.who}
</span>
)
@tomatau
tomatau / HelloWorld.js
Last active August 29, 2015 14:17
Hello JSX
let HelloWorld = React.createClass({
render(){
return <span>Hello, world!</span>;
}
})
React.render(<HelloWorld/>, document.body)
@tomatau
tomatau / package.json
Created March 5, 2015 13:58
Object.getPrototypeOf === undefined
/** Jest Config **/
"jest": {
"globals": {
"__DEV__": true,
"__TEST__": true
},
"testDirectoryName": "app/tests",
"testFileExtensions": [