From 6a30ab75a8dc29b32df40a7a24221966894d465b Mon Sep 17 00:00:00 2001 From: Johannes Hoffmann Date: Sun, 21 Oct 2018 14:41:29 +0200 Subject: [PATCH] remove method notation --- 12-component-refactor.html | 6 +++--- 16-advanced-integration.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/12-component-refactor.html b/12-component-refactor.html index be47318..a7c0bbe 100644 --- a/12-component-refactor.html +++ b/12-component-refactor.html @@ -94,7 +94,7 @@ return { currentRoom: 0 }; }, - componentDidMount() { + componentDidMount: function() { var component = this; var props = this.props; @@ -107,7 +107,7 @@ }, 1000); }, - componentWillUnmount() { + componentWillUnmount: function() { clearInterval(this.interval); }, @@ -147,4 +147,4 @@

Dynamic refactor

); ReactDOM.render(reactElement, document.getElementById("app")); - \ No newline at end of file + diff --git a/16-advanced-integration.html b/16-advanced-integration.html index 249e588..37245e8 100644 --- a/16-advanced-integration.html +++ b/16-advanced-integration.html @@ -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 @@ -139,4 +139,4 @@ context.arc(d.x, d.y, 3, 0, 2 * Math.PI); } } - \ No newline at end of file +