diff --git a/src/index.js b/src/index.js index 224d269..e94f701 100644 --- a/src/index.js +++ b/src/index.js @@ -139,6 +139,7 @@ function createLoadableComponent(loadFn, options) { constructor(props) { super(props); init(); + this._loadModule(); this.state = { error: res.error, @@ -155,10 +156,6 @@ function createLoadableComponent(loadFn, options) { return init(); } - UNSAFE_componentWillMount() { - this._loadModule(); - } - componentDidMount() { this._mounted = true; }