mirror of
https://github.com/maputnik/editor.git
synced 2026-08-25 06:27:25 +00:00
Remove shouldComponentUpdate because mapbox-gl will do the diff for us, so updates will no longer diff twice.
This commit is contained in:
@@ -94,16 +94,6 @@ 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) {
|
componentDidUpdate(prevProps) {
|
||||||
if(!IS_SUPPORTED) return;
|
if(!IS_SUPPORTED) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user