December 2019
Intermediate to advanced
474 pages
10h 3m
English
One of the simplest animations you can add is fading an element in or out by changing the value for the opacity of that element. In the Tic-Tac-Toe game you created previously, the slots were filled with either a green or blue color, depending on which player filled that slot. These colors already show a small transition since you're using the TouchableOpacity element to create the slot. However, it's possible to add a custom transition to this by using the Animated API. To add an animation, the following code blocks must be changed: