Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fastro/docs/fn-component.md

Full Stack Framework for Deno, TypeScript, Preact JS and Tailwind CSS
Latest
File

title: “Function Component” description: How to setup a page with TSX image: https://fastro.deno.dev/fastro.png previous: tsx-component next: ssr

This component will build JS script.

export const hello = () => {
    return <h1>Hello</h1>;
};

You can also pass a props there.

export const hello = (props: { name: string }) => {
    return <h1>Hello {props.name}</h1>;
};