Skip to content

feat: Auto-detect expo-haptics when available#558

Open
MatiPl01 wants to merge 2 commits into
mainfrom
feat/auto-detect-expo-haptics
Open

feat: Auto-detect expo-haptics when available#558
MatiPl01 wants to merge 2 commits into
mainfrom
feat/auto-detect-expo-haptics

Conversation

@MatiPl01
Copy link
Copy Markdown
Owner

@MatiPl01 MatiPl01 commented Jun 7, 2026

Summary

Adds an optional expo-haptics adapter so haptics work out of the box in any Expo app (including Expo Go), with automatic fallback to react-native-haptic-feedback for bare React Native.

The adapter reads the native module from the Expo runtime registry (globalThis.expo.modules.ExpoHaptics) instead of importing expo-haptics, so it does not break Metro bundling for apps that do not have it installed. No new dependency is added to the library.

Order

Stacked on #554 — merge that first.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-sortables-docs Ready Ready Preview, Comment Jun 8, 2026 9:41am

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 7, 2026
Base automatically changed from deps/bump-rn-0.85-reanimated-4.4 to main June 8, 2026 09:31
MatiPl01 added 2 commits June 8, 2026 11:38
Add an optional expo-haptics adapter that reads the native module from the
Expo runtime registry (globalThis.expo.modules.ExpoHaptics) instead of
importing the package. This way it is picked up automatically in any Expo
app (including Expo Go) without breaking Metro bundling for bare React
Native apps that don't have it installed.

Haptics now prefer expo-haptics and fall back to react-native-haptic-feedback
for bare React Native setups.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant