Responding to User Gestures
All of the examples that you’ve implemented so far in this book have relied on user gestures. In traditional web applications, you mostly deal with mouse events. However, touchscreens rely on the user manipulating elements with their fingers, which is fundamentally different from the mouse.
In this chapter, first, you’ll learn about scrolling. This is probably the most common gesture, besides touch. Then, you’ll learn about giving the user the appropriate level of feedback when they interact with your components. Finally, you’ll implement components that can be swiped.
The goal of this chapter is to show you how the gesture response system inside React Native works and some of the ways in which this system is exposed via components.
In this chapter, we’ll cover the following topics:
- Scrolling with your fingers
- Giving touch feedback
- Using Swipeable and cancellable components