Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Professional React Native

You're reading from   Professional React Native Expert techniques and solutions for building high-quality, cross-platform, production-ready apps

Arrow left icon
Product type Paperback
Published in Oct 2022
Publisher Packt
ISBN-13 9781800563681
Length 268 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alexander Benedikt Kuttig Alexander Benedikt Kuttig
Author Profile Icon Alexander Benedikt Kuttig
Alexander Benedikt Kuttig
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1: Getting Started with React Native
2. Chapter 1: What Is React Native? FREE CHAPTER 3. Chapter 2: Understanding the Essentials of JavaScript and TypeScript 4. Chapter 3: Hello React Native 5. Part 2: Building World-Class Apps with React Native
6. Chapter 4: Styling, Storage, and Navigation in React Native 7. Chapter 5: Managing States and Connecting Backends 8. Chapter 6: Working with Animations 9. Chapter 7: Handling Gestures in React Native 10. Chapter 8: JavaScript Engines and Hermes 11. Chapter 9: Essential Tools for Improving React Native Development 12. Part 3: React Native in Large-Scale Projects and Organizations
13. Chapter 10: Structuring Large-Scale, Multi-Platform Projects 14. Chapter 11: Creating and Automating Workflows 15. Chapter 12: Automated Testing for React Native Apps 16. Chapter 13: Tips and Outlook 17. Index 18. Other Books You May Enjoy

Using the internal Animated API of React Native

React Native comes with a built-in Animated API. This API is quite powerful, and you can achieve a lot of different animation goals with it. In this section, we will have a brief look at how it works and what advantages and limitations the internal Animated API has.

For a complete tutorial, please have a look at the official documentation at bit.ly/prn-animated-api.

To understand how the Animated API works, let’s start with a simple example.

Starting with a simple example

The following code implements a simple fade-in animation, which makes a view appear over the duration of 2 seconds:

import React, { useRef } from "react";
import { Animated, View, Button } from "react-native";
const App = () => {
  const opacityValue = useRef(new Animated.Value(0)).
      current;
  const showView = () => {
    Animated.timing(opacityValue...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime