Skip to content

Commit

Permalink
Updating the Pressable introduction
Browse files Browse the repository at this point in the history
  • Loading branch information
elicwhite authored Jul 8, 2020
1 parent 1d30636 commit 0c667d6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions website/blog/2020-07-06-version-0.63.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ For more information on LogBox and debugging react native, see the docs [here](h

## Pressable

React Native is built to enable applications to meet user’s expectations of the platform. This includes avoiding “tells”—little things that give away that the experience was built with React Native. One major source of these tells has been the Touchable components: `Button`, `TouchableWithoutFeedback`, `TouchableHighlight`, `TouchableOpacity`, `TouchableNativeFeedback`, and `TouchableBounce`.

These components make your application interactive by allowing you to provide visual feedback to user interactions. 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.
React Native is built to enable applications to meet user’s expectations of the platform. This includes avoiding “tells”—little things that give away that the experience was built with React Native. One major source of these tells has been the Touchable components: `Button`, `TouchableWithoutFeedback`, `TouchableHighlight`, `TouchableOpacity`, `TouchableNativeFeedback`, and `TouchableBounce`. These components make your application interactive by allowing you to provide visual feedback to user interactions. 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.

Further, as React Native has grown and our bar for high-quality applications has gone up, these components haven't grown with it. React Native now supports platforms like Web, Desktop, and TV, but support for additional input modalities has been lacking. React Native needs to support high-quality interaction experiences on all platforms.

To address these problems, we are shipping a new core component called `Pressable`. This component can be used to detect various types of interactions. It can be extended by the platform to include things like hover, blur, focus, and more. We expect that most people will build and share components utilizing `Pressable` under the hood instead of relying on the default experience of something like `TouchableOpacity`.
To address these problems, we are shipping a new core component called `Pressable`. This component can be used to detect various types of interactions. The API was designed to provide direct access to the current state of interaction without having to maintain state manually in a parent component. It was also designed to enable platforms to extend it's capabilities to include hover, blur, focus, and more. We expect that most people will build and share components utilizing `Pressable` under the hood instead of relying on the default experience of something like `TouchableOpacity`.

```jsx
import { Pressable, Text } from 'react-native';
Expand Down

0 comments on commit 0c667d6

Please sign in to comment.