Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove method notation #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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.
Jump to
Jump to file
Failed to load files.
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>