Animated (React Native)
Në shqip përdoret i njëjti emër.
ShpjegimiSQ
Animated është API-ja e integruar e React Native për animacione: krijon një vlerë që ndryshon me kohë (Animated.timing) dhe e lidh me stilin. Me useNativeDriver: true animacioni ekzekutohet në thread-in vendas.
EnglishEN
Animated is React Native's built-in animation API: you create a value that changes over time (Animated.timing) and connect it to a style. With useNativeDriver: true the animation runs on the native thread.
Si ta mendosh
Si një kukull me fije që e lëviz duke tërhequr fijet butë.
Lexoje në anglisht
Like a puppet you move by gently pulling the strings.
Shembull kodijavascript
const op = useRef(new Animated.Value(0)).current;
useEffect(() => { Animated.timing(op, { toValue: 1, duration: 400, useNativeDriver: true }).start(); }, []);
<Animated.View style={{ opacity: op }} />