Creating simple animations with react-native-animatable
There are a lot of animations that are reused in nearly every app. This is what react-native-animatable
is all about. This library is built on top of the internal React Native Animated API and provides a very simple declarative and imperative API to use simple, predefined animations.
Starting with a simple example
The following code example describes a simple fade-in animation with react-native-animatable
using the declarative method, along with a simple fade-out animation with react-native-animatable
using the imperative method:
import React from "react"; import { View, Text, Pressable } from "react-native"; import * as Animatable from 'react-native-animatable'; const App = () => { const handleRef = ref => this.view = ref; const hideView = () => { this.view.fadeOutDown(2000); } return ( ...