Skip to content

Commit

Permalink
Update viewstate on property changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hbruch committed Jan 4, 2022
1 parent 6991417 commit e3d7fbc
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ export class DeckGLContainer extends React.Component {
};
}

UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.viewport !== this.props.viewport) {
this.setState({ viewState: nextProps.viewport });
}
}

componentWillUnmount() {
clearInterval(this.state.timer);
}
Expand Down

0 comments on commit e3d7fbc

Please sign in to comment.