Skip to content

Commit 76c2903

Browse files
committed
docs: Mention expo-haptics in haptics setup docs
1 parent 37cc243 commit 76c2903

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ React Native Sortables is a powerful and easy-to-use library that brings smooth,
4444

4545
- **Auto-scrolling** beyond screen bounds
4646
- Customizable **layout animations** for items addition and removal
47-
- Built-in **haptic feedback** integration (requires [react-native-haptic-feedback](https://github.com/mkuczera/react-native-haptic-feedback) dependency)
47+
- Built-in **haptic feedback** integration via [expo-haptics](https://docs.expo.dev/versions/latest/sdk/haptics/) or [react-native-haptic-feedback](https://github.com/mkuczera/react-native-haptic-feedback)
4848
- Different **reordering strategies** (insertion, swapping)
4949

5050
- 💡 **Developer Experience**

packages/docs/docs/flex/props.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ Whether haptics are enabled. Vibrations are fired when the **pressed item become
899899

900900
:::important
901901

902-
To use built-in haptics, you have to install `react-native-haptic-feedback` package. See this [Getting Started](../getting-started#optional-dependencies) section for more details.
902+
To use built-in haptics, install `expo-haptics` (Expo apps, including Expo Go) or `react-native-haptic-feedback` (bare React Native). The library auto-detects whichever is available. See this [Getting Started](../getting-started#optional-dependencies) section for more details.
903903

904904
You can also use any other haptics library but you will have to trigger haptics manually when callbacks are called. See the [Callbacks](#callbacks) section for more details.
905905

packages/docs/docs/getting-started.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ Before getting started, you need to install and configure the following dependen
1919

2020
### Optional Dependencies
2121

22-
- **react-native-haptic-feedback**: For haptic feedback support
23-
- Follow the installation guide in the [react-native-haptic-feedback](https://github.com/mkuczera/react-native-haptic-feedback) README
22+
Haptic feedback is optional. The library automatically detects which haptics package is available, preferring **expo-haptics**:
23+
24+
- **expo-haptics**: recommended for Expo apps (already bundled in Expo Go). Install with `npx expo install expo-haptics`
25+
- **react-native-haptic-feedback**: for bare React Native apps. Follow the installation guide in its [README](https://github.com/mkuczera/react-native-haptic-feedback)
2426

2527
## 2. Installation
2628

packages/docs/docs/grid/props.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ Whether haptics are enabled. Vibrations are fired when the **pressed item become
785785

786786
:::important
787787

788-
To use built-in haptics, you have to install `react-native-haptic-feedback` package. See this [Getting Started](../getting-started#optional-dependencies) section for more details.
788+
To use built-in haptics, install `expo-haptics` (Expo apps, including Expo Go) or `react-native-haptic-feedback` (bare React Native). The library auto-detects whichever is available. See this [Getting Started](../getting-started#optional-dependencies) section for more details.
789789

790790
You can also use any other haptics library but you will have to trigger haptics manually when callbacks are called. See the [Callbacks](#callbacks) section for more details.
791791

0 commit comments

Comments
 (0)