Skip to content

Commit bea887b

Browse files
authored
AnimatedScaner - replace 'componentWillReceiveProps' with 'componentDidUpdate'. (#912)
1 parent 9607c63 commit bea887b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/animatedScanner/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ export default class AnimatedScanner extends BaseComponent {
6868
this.styles = createStyles(this.props);
6969
}
7070

71-
UNSAFE_componentWillReceiveProps(nextProps) {
72-
const {progress} = this.props;
73-
if (nextProps.progress !== progress) {
74-
this.animate(nextProps.progress, nextProps.duration);
71+
componentDidUpdate(prevProps) {
72+
const {progress, duration} = this.props;
73+
if (prevProps.progress !== progress) {
74+
this.animate(progress, duration);
7575
}
7676
}
7777

0 commit comments

Comments
 (0)