'AI' cannot be used as a JSX component.
Unanswered
Saint Bernard posted this in #help-forum
Saint BernardOP
Trying out Generative AI example
https://sdk.vercel.ai/docs/api-reference/generative-ui/create-ai
'AI' cannot be used as a JSX component.
Its return type 'Promise<ReactElement<any, string | JSXElementConstructor<any>>>' is not a valid JSX element.
Type 'Promise<ReactElement<any, string | JSXElementConstructor<any>>>' is missing the following properties from type 'ReactElement<any, any>': type, props, keyts(2786)
Type error on layout.tsx
return (
<html lang="en">
<body>
<AI>. <--- ERROR !!!
{children}
</AI>
</body>
</html>
https://sdk.vercel.ai/docs/api-reference/generative-ui/create-ai
'AI' cannot be used as a JSX component.
Its return type 'Promise<ReactElement<any, string | JSXElementConstructor<any>>>' is not a valid JSX element.
Type 'Promise<ReactElement<any, string | JSXElementConstructor<any>>>' is missing the following properties from type 'ReactElement<any, any>': type, props, keyts(2786)
Type error on layout.tsx
return (
<html lang="en">
<body>
<AI>. <--- ERROR !!!
{children}
</AI>
</body>
</html>