Is anyone here tried the nextjs 13 integration?
import { BuilderContent } from "@builder.io/react/dist/types/src/components/builder-content.component";
import { builder, BuilderComponent } from "@builder.io/sdk";
import builderConfig from "../config/builder";
async function loadBuilder<Tdata>(): Promise<Tdata> {
const content =
(await builder
.get("page", {
apiKey: builderConfig.builderKey,
url: "/",
cachebust: true,
userAttributes: {
urlPath: "/",
},
})
.promise()) || null;
return content;
}
export default async function Home() {
const content: BuilderContent = await loadBuilder<BuilderContent>();
return (
<>
<BuilderComponent content={content} model="page" />
</>
);
}
Error below:
Error: Functions cannot be passed directly to Client Components because they’re not serializable.
Please enlighten me on this issue. thank you