Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions createAnimatableComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ export default function createAnimatableComponent(WrappedComponent) {
}
}

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(props) {
componentDidUpdate(previousProps) {
const {
animation,
delay,
Expand All @@ -327,12 +326,12 @@ export default function createAnimatableComponent(WrappedComponent) {
iterationDelay,
transition,
onAnimationBegin,
} = props;
} = this.props;

if (transition) {
const values = getStyleValues(transition, props.style);
const values = getStyleValues(transition, this.props.style);
this.transitionTo(values, duration, easing, delay);
} else if (!deepEquals(animation, this.props.animation)) {
} else if (!deepEquals(animation, previousProps.animation)) {
if (animation) {
if (this.delayTimer) {
this.setAnimation(animation);
Expand Down Expand Up @@ -418,7 +417,7 @@ export default function createAnimatableComponent(WrappedComponent) {
: iterationCount <= 1,
duration: duration || this.props.duration || 1000,
useNativeDriver,
delay: (iterationDelay && currentIteration > 0) ? iterationDelay : 0,
delay: iterationDelay && currentIteration > 0 ? iterationDelay : 0,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a change made with yarn format

};

Animated.timing(animationValue, config).start((endState) => {
Expand Down