aboutsummaryrefslogtreecommitdiff
path: root/bench/react-hello-world.deno.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'bench/react-hello-world.deno.jsx')
-rw-r--r--bench/react-hello-world.deno.jsx14
1 files changed, 10 insertions, 4 deletions
diff --git a/bench/react-hello-world.deno.jsx b/bench/react-hello-world.deno.jsx
index 25c960a80..62497972e 100644
--- a/bench/react-hello-world.deno.jsx
+++ b/bench/react-hello-world.deno.jsx
@@ -1,6 +1,15 @@
import { renderToReadableStream } from "https://esm.run/react-dom/server";
import { serve } from "https://deno.land/std@0.146.0/http/server.ts";
import * as React from "https://esm.run/react";
+
+const App = () => (
+ <html>
+ <body>
+ <h1>Hello World</h1>
+ </body>
+ </html>
+);
+
const headers = {
headers: {
"Content-Type": "text/html",
@@ -9,10 +18,7 @@ const headers = {
await serve(
async (req) => {
- return new Response(
- await renderToReadableStream(<div>Hello World</div>),
- headers
- );
+ return new Response(await renderToReadableStream(<App />), headers);
},
{ port: 8080 }
);