// @deno-types="@types/react" import React from "react"; const A = (): React.ReactElement => <div />; const B = (): React.ReactElement => <A />;
TS2786 [ERROR]: 'A' cannot be used as a JSX component. Its type '() => React.ReactElement' is not a valid JSX element type. Type '() => React.ReactElement' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'. Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'. Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'. const B = (): React.ReactElement => <A />; ^ at file:///Users/elias/code/bureaudouble/bureau/src/routes/Home.tsx:23:38
'children' is declared here. children: ReactNode; ~~~~ at file:///Users/Library/Caches/deno/npm/registry.npmjs.org/@types/react/18.2.57/index.d.ts:326:9
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
D
Deno
Chat about Deno, a modern runtime for JavaScript and TypeScript.