Skip to content

Commit

Permalink
Add explicit useNativeDriver to AnimatedCircularProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-paired committed Jan 14, 2020
1 parent 6e37534 commit f3a50dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/AnimatedCircularProgress.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Animated, AppState, Easing, View, ViewPropTypes } from 'react-native';
import { Animated, Easing } from 'react-native';
import CircularProgress from './CircularProgress';
const AnimatedProgress = Animated.createAnimatedComponent(CircularProgress);

Expand Down Expand Up @@ -35,8 +35,10 @@ export default class AnimatedCircularProgress extends React.PureComponent {
const toValue = toVal >= 0 ? toVal : this.props.fill;
const duration = dur || this.props.duration;
const easing = ease || this.props.easing;
const useNativeDriver = this.props.useNativeDriver;

const anim = Animated.timing(this.state.fillAnimation, {
useNativeDriver,

This comment has been minimized.

Copy link
@mars-lan

mars-lan Jan 18, 2020

Not sure why but specifying this key in the config breaks animation, regardless of its value. Tested on iOS with RN 0.61.5.

This comment has been minimized.

Copy link
@RossValler

RossValler Jan 20, 2020

Can confirm this is broken for me as well on 0.61.4

toValue,
easing,
duration,
Expand Down Expand Up @@ -72,10 +74,12 @@ AnimatedCircularProgress.propTypes = {
duration: PropTypes.number,
easing: PropTypes.func,
onAnimationComplete: PropTypes.func,
useNativeDriver: PropTypes.bool,
};

AnimatedCircularProgress.defaultProps = {
duration: 500,
easing: Easing.out(Easing.ease),
prefill: 0,
useNativeDriver: true,
};

0 comments on commit f3a50dd

Please sign in to comment.