Skip to content

useWorklet throws "anonymous" is not a worklet #190

@JRolfBPS

Description

@JRolfBPS

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions