software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
6.13k stars 982 forks source link

Disable worklet warnings on web #3173

Closed nathan-ahn closed 4 weeks ago

nathan-ahn commented 1 month ago

Description

This PR disables callback worklet warnings on web. These warnings are unnecessary since the web platform doesn't leverage worklets.

m-bert commented 4 weeks ago

HI @nahn20! Unfortunately we don't want to remove this error, even on web 😞 If it is bothering you please use runOnJS as error suggests.

nathan-ahn commented 4 weeks ago

Makes sense! We were trying to avoid that since these callbacks are designed to be worklets, but on web, they're not detected and marked as worklets. I'm sure this works for Expo Router projects, but our build system isn't configured for web worklet detection.