fix: resolve gesture handler worklet conflicts and enhance color support#3
Merged
ashik112 merged 8 commits intoAug 17, 2025
Conversation
- Add runOnJS(true) modifier to Pan gesture to fix mixed worklet/JS callback warnings - Remove worklet directives from gesture callbacks for consistent JS thread execution - Add color-alpha dependency for robust color manipulation - Support named colors, hex, rgb, and rgba formats with proper alpha transparency - Clean up unused runOnJS imports and improve code maintainability Fixes gesture handler error: 'Some of the callbacks in the gesture are worklets and some are not' Enhances color prop to accept any valid CSS color format with alpha support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Problem
This PR addresses critical issues that prevented the library from working properly with React Native Reanimated and Gesture Handler:
react-native-gesture-handlererrors"red","blue") and various hex formats didn't work with alpha transparency🔧 Solution
Worklet Resolution
.runOnJS(true)toGesture.Pan()chain to force all callbacks to JavaScript thread'worklet'directives andrunOnJS()wrappers from gesture handlersEnhanced Color Support
color-alphalibrary for robust color handling"red","blue","green", etc.)#)📦 Dependencies
color-alphafor robust color manipulation🔄 Breaking Changes
📝 Example Usage
Fixes: Worklet conflicts, color handling limitations, and compatibility issues
Enhances: Developer experience with more intuitive color API and error-free gesture handling