From 9d8b88d39d949163aed259a5690a85cb594545ba Mon Sep 17 00:00:00 2001 From: liuyangzuo Date: Fri, 31 Aug 2018 00:26:55 +0800 Subject: [PATCH] react recommend async in componentDidMount lifeCycle --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 14b5bfa3..10bf608d 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(); }