SolidJSS
SolidJS14mo ago
13 replies
Gyome

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;

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)
Was this page helpful?