Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 12-component-refactor.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
return { currentRoom: 0 };
},

componentDidMount() {
componentDidMount: function() {
var component = this;
var props = this.props;

Expand All @@ -107,7 +107,7 @@
}, 1000);
},

componentWillUnmount() {
componentWillUnmount: function() {
clearInterval(this.interval);
},

Expand Down Expand Up @@ -147,4 +147,4 @@ <h3>Dynamic refactor</h3>
);

ReactDOM.render(reactElement, document.getElementById("app"));
</script>
</script>
4 changes: 2 additions & 2 deletions 16-advanced-integration.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
// is state for the library, other objects, listeners etc.
// they could be stored on the component and should be
// deleted to prevent memory leaks
componentWillUnmount() {}
componentWillUnmount: function() {}
});

// Now we can use the library as a component
Expand Down Expand Up @@ -139,4 +139,4 @@
context.arc(d.x, d.y, 3, 0, 2 * Math.PI);
}
}
</script>
</script>