Open nitedani opened 9 months ago
Describe the bug When settings "jsxImportSource": "@compiled/react", in tsconfig.json, ReactNode becomes an invalid component return type.
"jsxImportSource": "@compiled/react",
To Reproduce Steps to reproduce the behavior:
const ComponentA = (): React.ReactNode => { return <div></div>; }; const ComponentB = (): React.ReactNode => { return ( <div> <ComponentA /> ^^^^^^ 'ComponentA' cannot be used as a JSX component. Its return type 'ReactNode' is not a valid JSX element.ts(2786) const ComponentA: () => React.ReactNode </div> ); };
Expected behavior Align with the React types. ReactNode is a valid return type.
Screenshots
Describe the bug When settings
"jsxImportSource": "@compiled/react",
in tsconfig.json, ReactNode becomes an invalid component return type.To Reproduce Steps to reproduce the behavior:
Expected behavior Align with the React types. ReactNode is a valid return type.
Screenshots