Performance: Why Fresh is Deno's official web framework
Fresh impacts page load speed by delivering zero JavaScript by default and optimizing server-side rendering for fast initial paint.
export default function Home() {
return <h1>Hello World</h1>;
}import React from 'react'; import ReactDOM from 'react-dom/client'; function App() { return <h1>Hello World</h1>; } ReactDOM.createRoot(document.getElementById('root')).render(<App />);
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Client-side hydration with React | High (many nodes created by JS) | Multiple reflows during hydration | High paint cost due to delayed content | [X] Bad |
| Server-side rendering with Fresh | Low (static HTML parsed) | Single reflow on initial load | Low paint cost with instant content | [OK] Good |
export default function Home() {
return (
<main>
<h1>Welcome to Fresh</h1>
<p>Fast and simple web apps</p>
</main>
);
}export const handler = {
GET(req) {
return new Response('Hello from Fresh!');
}
};Pass the test and this pattern moves unknown