From 187cfbe2d80d7a103304e48c95307c4fdd74a228 Mon Sep 17 00:00:00 2001 From: David Luzar Date: Mon, 27 Jan 2020 19:24:11 +0100 Subject: [PATCH] temp hack fix for state updates (#593) * temp hack fix state updates * switch setTimeout for state mutation --- src/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index a6ed107d0..fc774a301 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -226,8 +226,11 @@ export class App extends React.Component { this.saveDebounced.flush(); }; - public shouldComponentUpdate() { + public shouldComponentUpdate(props: any, nextState: AppState) { if (!history.isRecording()) { + // temporary hack to fix #592 + // eslint-disable-next-line react/no-direct-mutation-state + this.state = nextState; this.componentDidUpdate(); return false; }