From 22c703391c4f1ab78df15e5a6f233fe99ad8daa3 Mon Sep 17 00:00:00 2001 From: Yurui Zhang Date: Wed, 4 Dec 2019 00:27:25 -0500 Subject: [PATCH] [v6] fixes broken lifecycle.js (#1699) * resumes broken lifecycle.js * add back componentDidMount in lifecycle.js --- .gitignore | 1 + src/lifecycle.js | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 72c9f4f..f100702 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ react-table.css .idea .DS_Store .history +.vscode \ No newline at end of file diff --git a/src/lifecycle.js b/src/lifecycle.js index 2e1a923..8623cf6 100644 --- a/src/lifecycle.js +++ b/src/lifecycle.js @@ -1,9 +1,7 @@ export default Base => class extends Base { - constructor (props) { - super(props) - - this.state = this.calculateNewResolvedState(this.getDataModel(this.getResolvedState(), true)) + UNSAFE_componentWillMount () { + this.setStateWithData(this.getDataModel(this.getResolvedState(), true)) } componentDidMount () {