Just wondering if we can use CSS animation and transformation in react-native? i.e.
<Image style={animateImage} / >
StyleSheet.create({
animateImage {
width: 100px;
height: 100px;
background: red;
transition: width 3s;
transition-delay: 1s;
}
});
No, you can't use CSS animations and transformations in React Native.
Animations allow you to convey physically believable motion in your interface. React Native provides two complementary animation systems: Animated for granular and interactive control of specific values, and LayoutAnimation for animated global layout transactions.
ReactCSSTransitionGroup is a high-level API based on ReactTransitionGroup and is an easy way to perform CSS transitions and animations when a React component enters or leaves the DOM. It's inspired by the excellent ng-animate library.
No, you cannot. React Native's Stylesheet
properties are pretty limited when compared with vanilla CSS.
For animations look into the Animated API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With