mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-30 22:55:29 +01:00
Merge pull request #571 from orangemug/fix/map-perf-improvement
Remove shouldComponentUpdate from <MapboxGlMap/>
This commit is contained in:
commit
1f03fdbb50
1 changed files with 0 additions and 10 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue