From 8747315ab29c0aaa68da4d52b79023c9806ac07c Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Mon, 26 Feb 2018 15:14:39 -0500 Subject: [PATCH] Don't update load and save buttons. This use of shouldComponentUpdate is wrapping the incorrect use of bind in the mapStateToProps call. --- src/containers/load-button.jsx | 3 +++ src/containers/save-button.jsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/containers/load-button.jsx b/src/containers/load-button.jsx index a7b78a638..4d7ca30b0 100644 --- a/src/containers/load-button.jsx +++ b/src/containers/load-button.jsx @@ -14,6 +14,9 @@ class LoadButton extends React.Component { 'handleClick' ]); } + shouldComponentUpdate () { + return false; + } handleChange (e) { const reader = new FileReader(); reader.onload = () => this.props.loadProject(reader.result); diff --git a/src/containers/save-button.jsx b/src/containers/save-button.jsx index f2ae497de..5516ba2c7 100644 --- a/src/containers/save-button.jsx +++ b/src/containers/save-button.jsx @@ -14,6 +14,9 @@ class SaveButton extends React.Component { 'handleClick' ]); } + shouldComponentUpdate () { + return false; + } handleClick () { const json = this.props.saveProjectSb3(); -- GitLab