This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let HelloWorld = React.createClass({ | |
render(){ | |
return <span>Hello, world!</span>; | |
} | |
}) | |
React.render(<HelloWorld/>, document.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Jest Config **/ | |
"jest": { | |
"globals": { | |
"__DEV__": true, | |
"__TEST__": true | |
}, | |
"testDirectoryName": "app/tests", | |
"testFileExtensions": [ |
NewerOlder