From ab7f57239d65901daf2a45951d267702578d3c67 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Mon, 4 Jul 2022 18:06:30 -0700 Subject: [bench] react hello world --- bench/react-hello-world.deno.jsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'bench/react-hello-world.deno.jsx') 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 = () => ( + + +

Hello World

+ + +); + const headers = { headers: { "Content-Type": "text/html", @@ -9,10 +18,7 @@ const headers = { await serve( async (req) => { - return new Response( - await renderToReadableStream(
Hello World
), - headers - ); + return new Response(await renderToReadableStream(), headers); }, { port: 8080 } ); -- cgit v1.2.3