function Greeting({ name }: { name: string }) {
return (
<div class="card">
<h1>Hello, {name}!</h1>
<p>Welcome to my site.</p>
</div>
);
}
That looks like HTML, but it's TypeScript. It gets compiled to actual HTML. Can any Python framework do that??
In Python, you'd typically write your logic in Python and your HTML in a separate Jinja2 template file — two languages, two files, context-switching. With Fresh + TSX, your logic and your markup live together in one .tsx file, both in TypeScript, with full type-checking throughout.