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
Check if updating to the latest Preact version resolves the issue.
Describe the bug: FunctionalComponent doesn't allow returning just children, although code compiles successfully (with // @ts-ignore) and works as expected.
To Reproduce:
// DummyComponent.tsximport{FunctionalComponent,h}from"preact";constDummyComponent: FunctionalComponent=({ children })=>{returnchildren;});exportdefaultDummyComponent;
Error in VS Code: Type 'ComponentChildren' is not assignable to type 'VNode<any> | null'.
Expected behavior:
No errors.
The text was updated successfully, but these errors were encountered:
Describe the bug:
FunctionalComponent
doesn't allow returning justchildren
, although code compiles successfully (with// @ts-ignore
) and works as expected.To Reproduce:
Error in VS Code:
Type 'ComponentChildren' is not assignable to type 'VNode<any> | null'.
Expected behavior:
No errors.
The text was updated successfully, but these errors were encountered: