mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-29 12:10:22 +02:00
Merge pull request #5057 from timofeevAV/patch-1
Remove duplication of TouchableHighlight
This commit is contained in:
@@ -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`.
|
||||||
|
Reference in New Issue
Block a user