react-native-worklets-core
react-native-worklets-core copied to clipboard
useWorklet throws "anonymous" is not a worklet
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:
I installed the package using yarn and added the related plugin in my babel.config.js. Maybe this is related to PR #187?