Skip to content

Instantly share code, notes, and snippets.

@gflarity
Created March 20, 2023 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gflarity/8d9663e5cd1314d1fce6aa84f4a21d3e to your computer and use it in GitHub Desktop.
Save gflarity/8d9663e5cd1314d1fce6aa84f4a21d3e to your computer and use it in GitHub Desktop.
Using TSX/JSX files with Deno.
#!/usr/bin/env deno run
/** @jsxImportSource https://esm.sh/preact */
import { render } from "https://esm.sh/preact-render-to-string@5.2.6";
export function App() {
return (
<html lang="en">
<head>
<title>title</title>
</head>
<body>
Hello World!
</body>
</html>
);
}
console.log(render(App()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment