react-native-worklets-core icon indicating copy to clipboard operation
react-native-worklets-core copied to clipboard

useWorklet throws "anonymous" is not a worklet

Open JRolfBPS opened this issue 1 year ago • 0 comments

I have tried testing this library with code similar to the example code from this repository. I built a react native functional component that uses the useWorklet hook in order to create a basic worklet:

const testWorklet = useWorklet("default", (name: string) => {
    "worklet";

    console.log("Hello, " + name);

    return "Return " + name;
  } )

When I run the app I encounter the following error: image

I installed the package using yarn and added the related plugin in my babel.config.js. Maybe this is related to PR #187?

JRolfBPS avatar May 08 '24 12:05 JRolfBPS