Next.js App Router Issues with register custom component

Running into this error when trying to register components for the app router of Next.js:

Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".
  {component: function, name: ..., inputs: ...}

I see this example here: builder/examples/next-js-sdk-gen-2-experimental-app-directory at main · BuilderIO/builder · GitHub

but its experimental. It’s advicing me back to the original example, but this results me in getting the error as seen as above.

Ah I realized I was registering components as server components ,but this isn’t supported only in the new version. builder/packages/sdks/output/nextjs/README.md at main · BuilderIO/builder · GitHub

This issue is solved then.