diff --git a/src/components/map/MapboxGlMap.jsx b/src/components/map/MapboxGlMap.jsx index dd4885f..0a482f9 100644 --- a/src/components/map/MapboxGlMap.jsx +++ b/src/components/map/MapboxGlMap.jsx @@ -97,6 +97,16 @@ export default class MapboxGlMap 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;