You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
constComponentA=(): React.ReactNode=>{return<div></div>;};constComponentB=(): 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
The text was updated successfully, but these errors were encountered:
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
![image](https://private-user-images.githubusercontent.com/67418286/290684301-4f2da7fc-04f5-4ee2-817b-ccafe6ffa4f2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1MTY5NDYsIm5iZiI6MTcyNTUxNjY0NiwicGF0aCI6Ii82NzQxODI4Ni8yOTA2ODQzMDEtNGYyZGE3ZmMtMDRmNS00ZWUyLTgxN2ItY2NhZmU2ZmZhNGYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA1VDA2MTA0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4MWM5ZmIxMTlmNDJmMmE5ZTJkNzc4OTM3NDQwNDgzM2EzZDQ3MWQyNjlmMjQzYmMxYTA2ZmNjMTAwYmZlM2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._0I6y8nuYQ10pyiMhoFN0QdxAt0Af7B78sSdV77JmFg)
The text was updated successfully, but these errors were encountered: