prisma-server-actions icon indicating copy to clipboard operation
prisma-server-actions copied to clipboard

Invalid JSX

Open MincePie opened this issue 2 years ago • 1 comments

Hi Steven,

Thanks very much for sharing this (and the yt video).

I'm trying to use this inside your precedents repo.

The app/page.tsx generates an error that says: 'Posts' cannot be used as a JSX component. Its return type 'Promise<Element>' is not a valid JSX element. Type 'Promise<Element>' is missing the following properties from type 'ReactElement<any, any>': type, props, key

Do you know if there is a way to fix this?

Thank you

MincePie avatar Aug 15 '23 04:08 MincePie

use {/* @ts-expect-error server component */} above the server component in that jsx

vanta240i avatar Nov 22 '23 21:11 vanta240i