Это сводит меня с ума. Я пытаюсь получить изображение для анимации от blurRadius
от 10 до 0.
Вот Экспо Снэк .
И вот код.
import React, { useEffect } from 'react';
import { Animated, View } from 'react-native';
const BlurredImageAnimation = (props) => {
const blurRadius = new Animated.Value(10);
const startAnimation = () =>
Animated.timing(blurRadius, {
toValue: 0,
duration: 5000,
useNativeDriver: true,
}).start();
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Animated.Image
source={require('./assets/snack-icon.png')}
style={{ width: 258, height: 258 }}
blurRadius={blurRadius}
onLoad={startAnimation}
/>
</View>
);
};
export default BlurredImageAnimation;
Почему это не оживляет? Как я могу заставить это работать? Спасибо!