Reopen : Is it possible to use third party library in worklet? #3330 #5389
-
I am using GestureDetectors and have a grid and l have all cell draw functions as worklets .I have used value formatters for the text, number , date etc which call 3 rd party libs like numbro , date-fns . Is there a way I can use runOnJS and wait on the result . Please point me to an example where we are awaiting on values set on runOnJS . |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Unfortunately, it is not possible to wait for the result in worklets. Currently you cannot use functions from |
Beta Was this translation helpful? Give feedback.
I can see your issue now. Probably
MakeFromSVGString
is not a worklet function, so you won't be able to create a Skia Path inside a worklet. TheMakeFromSVGString
method should be workletized in thereact-native-skia
library in order to make it work on the UI thread.Usually, you won't be able to call third-party modules inside worklets because they do not provide workletized versions of exported functions/methods.