1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-09-01 21:32:35 +02:00

Update 100-touchables.md

This commit is contained in:
Timofeev Artyom
2024-01-20 00:38:56 +05:00
committed by GitHub
parent ed0e376d46
commit 53c9279049

View File

@@ -59,7 +59,7 @@ In React Native, `Touchable` components are used to handle user interactions lik
</TouchableNativeFeedback> </TouchableNativeFeedback>
``` ```
- `TouchableHighlight`: The view will slightly change scale when pressed. - `TouchableScale`: The view will slightly change scale when pressed.
```jsx ```jsx
import { TouchableScale } from 'react-native-touchable-scale'; import { TouchableScale } from 'react-native-touchable-scale';
@@ -74,4 +74,4 @@ In React Native, `Touchable` components are used to handle user interactions lik
</TouchableScale> </TouchableScale>
``` ```
Each of these components is from the `react-native` package, except `TouchableScale` which is from `react-native-touchable-scale`. They can be used interchangeably depending on the type of interaction you want to provide. The main `props` used with these components are `onPress`, `onLongPress`, and some component-specific ones like `underlayColor` for `TouchableHighlight`. Each of these components is from the `react-native` package, except `TouchableScale` which is from `react-native-touchable-scale`. They can be used interchangeably depending on the type of interaction you want to provide. The main `props` used with these components are `onPress`, `onLongPress`, and some component-specific ones like `underlayColor` for `TouchableHighlight`.