Shake Animation in React Native (Reanimated)

Опубликовано: 15 Октябрь 2024
на канале: Reactiive
5,942
171

This tutorial is about a Shake animation made with Reanimated.
Building it will be extremely helpful also from a didactic perspective because we're going to discover one by one, the most interesting high-order functions from Reanimated, such as: withTiming, withSequence, withRepeat, and withSpring.

My React Native animations course: https://www.reanimate.dev

Do you like React Native animations?
Support me on Patreon:   / reactiive  
Twitter:   / reactiive_  

Source code: https://github.com/enzomanuelmangano/...

If you're new to Reanimated, have a look at my Animate with Reanimated series:
   • Introduction to React Native Reanimat...  

Chapters:
00:00 Introduction
00:48 Setup the boilerplate
05:32 Define the shake animation
09:10 Add withSequence
10:31 Add withRepeat
12:30 Enhance the Timing Config
15:10 Add withSpring
16:23 The useAnimatedShake hook
18:02 Add the Counter logic
21:10 The error color animation