Gyome
Gyome
SSolidJS
Created by Gyome on 12/5/2024 in #support
Component type
On the documentation I saw this example :
import { type Component } from "solid-js";

const MyTsComponent(): Component = () => {
return (
<div>
<h1>This is a TypeScript component</h1>
</div>
);
}

export default MyTsComponent;
import { type Component } from "solid-js";

const MyTsComponent(): Component = () => {
return (
<div>
<h1>This is a TypeScript component</h1>
</div>
);
}

export default MyTsComponent;
It should not be const MyTsComponent = (): Component => { ? Maybe it is a reserved syntax handled by the solid transpilator ? (sorry if there are some english errors)
14 replies