We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9607c63 commit bea887bCopy full SHA for bea887b
src/components/animatedScanner/index.js
@@ -68,10 +68,10 @@ export default class AnimatedScanner extends BaseComponent {
68
this.styles = createStyles(this.props);
69
}
70
71
- UNSAFE_componentWillReceiveProps(nextProps) {
72
- const {progress} = this.props;
73
- if (nextProps.progress !== progress) {
74
- this.animate(nextProps.progress, nextProps.duration);
+ componentDidUpdate(prevProps) {
+ const {progress, duration} = this.props;
+ if (prevProps.progress !== progress) {
+ this.animate(progress, duration);
75
76
77
0 commit comments