From a9e4ff2029a769737982fcf7e0b7d76d35cf35e4 Mon Sep 17 00:00:00 2001 From: evan Date: Tue, 12 Jul 2022 04:40:12 -0400 Subject: cleanup benchmarks folder (#587) * cleanup benchmarks * run prettier --- bench/react-hello-world/react-hello-world.jsx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bench/react-hello-world/react-hello-world.jsx (limited to 'bench/react-hello-world/react-hello-world.jsx') diff --git a/bench/react-hello-world/react-hello-world.jsx b/bench/react-hello-world/react-hello-world.jsx new file mode 100644 index 000000000..4c3fc5967 --- /dev/null +++ b/bench/react-hello-world/react-hello-world.jsx @@ -0,0 +1,25 @@ +// import { renderToReadableStream } from "react-dom/server.browser"; +var { renderToReadableStream } = import.meta.require( + "../../test/bun.js/reactdom-bun.js" +); + +const headers = { + headers: { + "Content-Type": "text/html", + "Cache-Control": "no-transform", // set to match the Deno benchmark, which requires this for an apples to apples comparison + }, +}; + +const App = () => ( + + +

Hello World

+ + +); + +export default { + async fetch(req) { + return new Response(await renderToReadableStream(), headers); + }, +}; -- cgit v1.2.3