From 4e3dd233167315cafe99ed4618a4e4ee27e3f2df Mon Sep 17 00:00:00 2001 From: Cheng Lou Date: Tue, 29 Oct 2013 14:20:04 -0400 Subject: [PATCH] fix 2 more entries --- cookbook/11-dom-event-listeners.md | 4 ++-- cookbook/12-initial-ajax.md | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbook/11-dom-event-listeners.md b/cookbook/11-dom-event-listeners.md index 1336953a..d0a89a5a 100644 --- a/cookbook/11-dom-event-listeners.md +++ b/cookbook/11-dom-event-listeners.md @@ -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
Current window width: {this.state.windowWidth}
; diff --git a/cookbook/12-initial-ajax.md b/cookbook/12-initial-ajax.md index af867670..700fdcd3 100644 --- a/cookbook/12-initial-ajax.md +++ b/cookbook/12-initial-ajax.md @@ -41,6 +41,7 @@ var UserGist = React.createClass({ }); React.renderComponent( - , mountNode + , + mountNode ); ```