From 18de9a4cec13c50d64ec5efb0b6d515de8d2b8bc Mon Sep 17 00:00:00 2001 From: Daggron Date: Tue, 17 Dec 2019 18:12:48 +0530 Subject: [PATCH 1/2] Updated componentWillMount to componentDidMount --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 14b5bfa3..8c7d36dc 100644 --- a/src/index.js +++ b/src/index.js @@ -158,7 +158,7 @@ function createLoadableComponent(loadFn, options) { return init(); } - componentWillMount() { + componentDidMount() { this._mounted = true; this._loadModule(); } @@ -213,7 +213,7 @@ function createLoadableComponent(loadFn, options) { }); } - componentWillUnmount() { + componentDidUnmount() { this._mounted = false; this._clearTimeouts(); } From 99603900d6e6217a27df04210aa43baef52dd1c5 Mon Sep 17 00:00:00 2001 From: Abhay Sharma <41940582+Daggron@users.noreply.github.com> Date: Sat, 11 Jan 2020 11:55:42 +0530 Subject: [PATCH 2/2] chnaged back to component will unmount --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 8c7d36dc..10bf608d 100644 --- a/src/index.js +++ b/src/index.js @@ -213,7 +213,7 @@ function createLoadableComponent(loadFn, options) { }); } - componentDidUnmount() { + componentWillUnmount() { this._mounted = false; this._clearTimeouts(); }