visit
Pressable
component was introduced.
The preferred and suggested component, per React Native, is the Pressable
component (and by extension the Pressability API).
From the announcement post for React Native v0.63: "However, because they include built-in styles and effects that don’t match the platform interaction, users can tell when experiences are written with React Native."
The Pressable
component itself has a very familiar API to the Touchable components you may be familiar with while allowing for extensibility that the Touchable* components don't.
Under their hood, the Touchable* components use the Pressability
API for their implementation so they're fully supported but they still have the drawbacks outlined above.
So, in conclusion, the next time you need to handle user interaction reach for Pressable
over Touchable
- it does everything you know and love but better.
Also published .