O'Reilly logo

React and React Native by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 21. 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 generally worry about mouse events. However, touchscreens rely on the user manipulating elements with their fingers—fundamentally different from the mouse.

The goal of this chapter is to show you how the gesture response system inside of React Native works and some of the ways this system is exposed to us through components.

We'll begin with scrolling. This is probably the common gesture, besides touch. Then, we'll talk about giving the user the appropriate level of feedback when they interact with our components. Finally, we'll implement components that can be swiped.

Scrolling ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required