INNER CODE UNIT · JavaScript
ShimmerPlaceholder
tomzaku/react-native-shimmer-placeholder · lib/ShimmerPlaceholder.js:7
class ShimmerPlaceholder extends PureComponent {
state = {
beginShimmerPosition: new Animated.Value(-1),
};
getAnimated = () => {
const { delay, duration, isInteraction } = this.props;
return Animated.loop(
Animated.timing(this.state.beginShimmerPosition, {
toValue: 1,
delay,
duration,
useNativeDriver: Platform.OS !== "web",
isInteraction,
})
);
};
animatedValue = this.getAnimated();