aboutsummaryrefslogtreecommitdiff
path: root/bench/react-hello-world/react-hello-world.jsx
blob: 15f2b000b4ff9634b0ba4e40ddc09362aee1e05d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { renderToReadableStream } from "../../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 = () => (
  <html>
    <body>
      <h1>Hello World</h1>
    </body>
  </html>
);

export default {
  async fetch(req) {
    return new Response(await renderToReadableStream(<App />), headers);
  },
};