Skip to content

Commit

Permalink
componentDidUpdate implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosendo Salazar committed Nov 12, 2020
1 parent b7af107 commit 47d95c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/FlatListSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export default class FlatListSlider extends Component {
}
}

componentDidUpdate(prevprops) {
if (prevprops.data !== this.props.data) this.setState({ data: this.props.data });
}

componentWillUnmount() {
if (this.props.autoscroll) {
this.stopAutoPlay();
Expand Down

0 comments on commit 47d95c2

Please sign in to comment.