From d8ba8fcbfb6a42bf64ac7274e7815e2c23896d6c Mon Sep 17 00:00:00 2001 From: pathmapper Date: Fri, 5 Jun 2020 15:11:49 +0200 Subject: [PATCH 1/3] Add again shouldComponentUpdate --- src/components/MapMapboxGl.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/MapMapboxGl.jsx b/src/components/MapMapboxGl.jsx index ea08e85..9493da0 100644 --- a/src/components/MapMapboxGl.jsx +++ b/src/components/MapMapboxGl.jsx @@ -97,6 +97,16 @@ export default class MapMapboxGl extends React.Component { ) } + shouldComponentUpdate(nextProps, nextState) { + let should = false; + try { + should = JSON.stringify(this.props) !== JSON.stringify(nextProps) || JSON.stringify(this.state) !== JSON.stringify(nextState); + } catch(e) { + // no biggie, carry on + } + return should; + } + componentDidUpdate(prevProps) { if(!IS_SUPPORTED) return; From 8f944d9973e673f608c6aa2dbdc44602d54984be Mon Sep 17 00:00:00 2001 From: pathmapper Date: Sat, 6 Jun 2020 12:46:53 +0200 Subject: [PATCH 2/3] Empty Commit to trigger codesanbox again From 70eb3e785a870be51d215c2a054e2736a6f80226 Mon Sep 17 00:00:00 2001 From: pathmapper Date: Sat, 6 Jun 2020 12:48:34 +0200 Subject: [PATCH 3/3] Trigger codesandbox