In this recipe, we will create a notification component from scratch. When showing the notification, the component will slide in from the top of the screen. After a few seconds, we will automatically hide it by sliding it out.
Creating animated notifications
Getting ready
We are going to create an app. Let's call it notification-animation.
How to do it...
- We'll start by working on the App component. First, let's import all the required dependencies:
import React, { Component } from 'react';
import {
Text,
TouchableOpacity,
StyleSheet,
View...