fix 2 more entries

This commit is contained in:
Cheng Lou 2013-10-29 14:20:04 -04:00
parent ee8fa3760d
commit cbec8c1a89
2 changed files with 4 additions and 3 deletions

View File

@ -24,10 +24,10 @@ var Box = React.createClass({
this.setState({windowWidth: window.innerWidth});
},
componentDidMount: function() {
window.addEventListener("resize", this.handleResize);
window.addEventListener('resize', this.handleResize);
},
componentWillUnmount: function() {
window.removeEventListener("resize", this.handleResize);
window.removeEventListener('resize', this.handleResize);
},
render: function() {
return <div>Current window width: {this.state.windowWidth}</div>;

View File

@ -41,6 +41,7 @@ var UserGist = React.createClass({
});
React.renderComponent(
<UserGist source="https://api.github.com/users/octocat/gists" />, mountNode
<UserGist source="https://api.github.com/users/octocat/gists" />,
mountNode
);
```