Skip to content

RedwoodSDK

RedwoodSDK scores 13 of 28 points. That is 6 of 14 on the 7 features that affect first paint (the moment the browser first draws content), and 7 of 14 on the 7 other features.

Rank 19 of 2313/28 points: 6/14 first-paint, 7/14 other · 46% complete
Version checked
rwsdk 1.7.5 (npm latest on 2026-11-25)
Version notes
RedwoodSDK runs on Cloudflare Workers only; the Books port runs the same Worker bundle in a Node wrapper on Vercel and Netlify.
Performance guide
React Compiler | RedwoodSDK DocsThe only page in the Optimize guides; closest official page.
Issues
github.com/redwoodjs/sdk/issues

Scorecard

All 14 features, in two groups. Each row shows RedwoodSDK's label, how that label compares across all 23 frameworks, and how to enable the feature. Feature names link to RedwoodSDK's entry on that feature's page.

RedwoodSDK's labels across 14 features

  • 1st-party5
  • Experimental0
  • Third-party3
  • Manual6
  • of 14

How it compares

On 5 of 14 features, no framework has a higher-scoring label than RedwoodSDK. On the other 9, at least one does.

First-paint levers

6/14
  • Manual, like 11 of the other 22 frameworks. 11 frameworks score higher.

    Show the how-to

    No first-party CSS inlining documented; the Document links a stylesheet imported with ?url (<link rel="stylesheet" href={styles} />). Inline by hand. (tailwind, documents)

    Code example

    Import the stylesheet with Vite's ?inline query instead of ?url, and write it into a <style> in the Document. The Document renders only on the server, so the CSS string does not ship in a client bundle.

    // src/app/Document.tsx
    import styles from "./styles.css?inline"; // was: import styles from "./styles.css?url";
    
    export const Document: React.FC<{ children: React.ReactNode }> = ({ children }) => (
      <html lang="en">
        <head>
          <meta charSet="utf-8" />
          <title>RedwoodSDK App</title>
          {/* was: <link rel="stylesheet" href={styles} /> */}
          <style dangerouslySetInnerHTML={{ __html: styles }} />
          <link rel="modulepreload" href="/src/client.tsx" />
        </head>
        <body>
          {children}
          <script>import("/src/client.tsx")</script>
        </body>
      </html>
    );

    Source: RedwoodSDK: Tailwind CSS · Vite: disabling CSS injection

  • 02Font optimizationThird-party1 pt

    Third-party, like 18 of the other 22 frameworks. 4 frameworks score higher.

    Show the how-to

    No first-party font handling documented; the docs show font files in public/fonts with a hand-written @font-face. The third-party route is Fontsource. (public-assets)

    Code example

    Install a Fontsource package and import it at the top of the stylesheet. The package ships the @font-face rules and self-hosted font files, and Vite bundles them like any other CSS import.

    /* src/app/styles.css */
    @import "@fontsource-variable/inter";
    @import "tailwindcss";
    
    @theme {
      --font-sans: "Inter Variable", ui-sans-serif, system-ui, sans-serif;
    }

    Source: Fontsource: Installing fonts

  • 03Image pipelineThird-party1 pt

    Third-party, like 13 of the other 22 frameworks. 9 frameworks score higher.

    Show the how-to

    No image component or optimizer documented; images are plain <img> tags served from public/. The third-party route is the host's Cloudflare Images transformations, wired by hand. (public-assets)

    Code example

    Turn on Cloudflare Images transformations for the zone, then build /cdn-cgi/image/<OPTIONS>/<SOURCE> URLs by hand. This helper writes a srcSet that asks Cloudflare for each width in the best format the browser accepts.

    // src/app/components/CfImage.tsx
    const cf = (src: string, width: number) =>
      `/cdn-cgi/image/width=${width},quality=75,format=auto${src}`;
    
    export function CfImage({ src, alt, width, height }: {
      src: string; alt: string; width: number; height: number;
    }) {
      return (
        <img
          src={cf(src, width)}
          srcSet={[1, 2].map((d) => `${cf(src, width * d)} ${width * d}w`).join(", ")}
          sizes={`${width}px`}
          alt={alt} width={width} height={height} loading="lazy" decoding="async"
        />
      );
    }

    Source: Cloudflare Images: Transform via URL

    Art direction with <picture>

    Manual

    Serving a different crop or format per screen size. Not scored: the label shows how much the framework does for you.

    No first-party <picture> helper documented; hand-write the markup. (public-assets)

    Example

    There is no image component, so write the <picture> by hand in a server component. Wide screens get a landscape crop and narrow screens get a square one, both served from public/. React spells the attribute srcSet.

    // src/app/components/Hero.tsx
    export function Hero() {
      return (
        <picture>
          {/* art direction: a square crop on narrow screens */}
          <source media="(max-width: 640px)" srcSet="/images/hero-square-640.webp"
                  width={640} height={640} />
          <source media="(min-width: 641px)" srcSet="/images/hero-wide-1600.webp"
                  width={1600} height={900} />
          <img src="/images/hero-wide-1600.jpg" alt="Shelves of books"
               width={1600} height={900} fetchPriority="high" decoding="async" />
        </picture>
      );
    }

    Source: MDN: the picture element · RedwoodSDK: Public Assets

  • Manual, like 4 of the other 22 frameworks. 18 frameworks score higher.

    Show the how-to

    No prerender, ISR or cache API documented; set Cache-Control by hand on the response headers. The client-navigation guide says RSC payload requests are GETs so browsers and CDNs can cache them. (routing, client-side-nav)

    Code example

    Put a small handler in front of the page in the route's array and set Cache-Control on response.headers. The browser and Cloudflare's edge then cache the HTML for that route.

    // src/worker.tsx
    import { defineApp } from "rwsdk/worker";
    import { render, route } from "rwsdk/router";
    import { Document } from "@/app/Document";
    import { BookPage } from "@/app/pages/BookPage";
    
    export default defineApp([
      render(Document, [
        route("/books/:id", [
          ({ response }) => {
            response.headers.set("Cache-Control", "public, max-age=60, s-maxage=300");
          },
          BookPage,
        ]),
      ]),
    ]);

    Source: RedwoodSDK: Request Handling, Routing & Responses

  • 05Route prefetching1st-party2 pts

    1st-party, like 18 of the other 22 frameworks. None scores higher.

    Show the how-to

    With client-side navigation on, <link rel="x-prefetch" href="/about" /> makes RedwoodSDK fetch that route in the background after each navigation and store the response in the browser Cache API. Needs the onHydrated callback from initClientNavigation(). No hover or viewport trigger documented. (client-side-nav)

    Code example

    Turn on client navigation and pass onHydrated to initClient. Then render <link rel="x-prefetch"> for likely next routes. RedwoodSDK fetches each one after navigation and keeps it in the Cache API.

    // src/client.tsx
    import { initClient, initClientNavigation } from "rwsdk/client";
    
    const { handleResponse, onHydrated } = initClientNavigation();
    initClient({ handleResponse, onHydrated });
    // src/app/pages/BlogListPage.tsx
    import { link } from "@/shared/links";
    
    export function BlogListPage({ posts }) {
      return posts.map((post) => {
        const href = link("/blog/:slug", { slug: post.slug });
        return (
          <article key={post.id}>
            <link rel="x-prefetch" href={href} />
            <a href={href}><h2>{post.title}</h2></a>
          </article>
        );
      });
    }

    Source: RedwoodSDK: Client Side Navigation

  • 06Streaming SSR1st-party2 pts

    1st-party, like 17 of the other 22 frameworks. None scores higher.

    Show the how-to

    Server components are "rendered on the server as HTML and then streamed to the client". Wrap an async server component in <Suspense fallback={...}> to show a loading state while its data is fetched. Nothing to enable. (react-server-components)

    Code example

    Make a server component async and wrap it in <Suspense>. The page shell streams first with the fallback, and the list streams in when the query resolves.

    // src/app/pages/todos/TodoPage.tsx
    import { Suspense } from "react";
    
    export async function Todos({ ctx }) {
      const todos = await db.todo.findMany({ where: { userId: ctx.user.id } });
      return <ol>{todos.map((todo) => <li key={todo.id}>{todo.title}</li>)}</ol>;
    }
    
    export async function TodoPage({ ctx }) {
      return (
        <div>
          <h1>Todos</h1>
          <Suspense fallback={<div>Loading...</div>}>
            <Todos ctx={ctx} />
          </Suspense>
        </div>
      );
    }

    Source: RedwoodSDK: React Server Components

  • Manual, like 15 of the other 22 frameworks. 7 frameworks score higher.

    Show the how-to

    No first-party preload Link headers or 103 Early Hints documented; the Document example hand-writes <link rel="modulepreload" href="/src/client.tsx" />. Set a Link header by hand with requestInfo.response.headers in middleware. (documents, routing)

    Code example

    Add a middleware that sets a Link header on every response. This one preloads a font from public/, whose URL does not change between builds. Cloudflare can turn Link preload headers into 103 Early Hints when Early Hints is on for the zone.

    // src/app/headers.ts
    import type { RouteMiddleware } from "rwsdk/worker";
    
    export const preloadHeaders = (): RouteMiddleware => ({ response }) => {
      response.headers.append(
        "Link",
        "</fonts/brand-font.woff2>; rel=preload; as=font; type=font/woff2; crossorigin",
      );
    };
    
    // src/worker.tsx
    export default defineApp([
      preloadHeaders(),
      render(Document, [route("/", HomePage)]),
    ]);

    Source: RedwoodSDK: Security · Cloudflare: Early Hints

Other features

7/14
  • 1st-party, like 14 of the other 22 frameworks. None scores higher.

    Show the how-to

    React Server Components are the default; only components marked "use client" ship JavaScript and hydrate. (react-server-components)

    Code example

    Pages are server components by default and send no JavaScript. Only the component marked "use client" ships code and hydrates.

    // src/app/components/LikeButton.tsx
    "use client";
    import { useState } from "react";
    
    export function LikeButton() {
      const [likes, setLikes] = useState(0);
      return <button onClick={() => setLikes(likes + 1)}>Like ({likes})</button>;
    }
    
    // src/app/pages/BookPage.tsx (server component, no client JS of its own)
    import { LikeButton } from "@/app/components/LikeButton";
    
    export async function BookPage({ params }) {
      const book = await getBook(params.id);
      return (
        <article>
          <h1>{book.title}</h1>
          <p>{book.description}</p>
          <LikeButton />
        </article>
      );
    }

    Source: RedwoodSDK: React Server Components

  • 1st-party, like 18 of the other 22 frameworks. None scores higher.

    Show the how-to

    render(Document, routes, { ssr: false }) renders a group of routes on the client only, and { rscPayload: false } serves a group as static HTML with no hydration. No build-time prerender documented. (sdk-router)

    Code example

    Pass options as the third argument to render(). rscPayload: false serves a group as static HTML with no hydration, and ssr: false renders client components only in the browser.

    // src/worker.tsx
    import { defineApp } from "rwsdk/worker";
    import { render, prefix } from "rwsdk/router";
    import { ReactDocument, StaticDocument } from "@/app/Document";
    
    export default defineApp([
      // Default: SSR with the RSC payload, so the page hydrates
      render(ReactDocument, [prefix("/app", appRoutes)]),
      // Static HTML, no hydration (StaticDocument has no client script)
      render(StaticDocument, [prefix("/docs", docsRoutes)], { rscPayload: false }),
      // Client components render only in the browser
      render(ReactDocument, [prefix("/spa", spaRoutes)], { ssr: false }),
    ]);

    Source: RedwoodSDK: sdk/router

  • 1st-party, like 21 of the other 22 frameworks. None scores higher.

    Show the how-to

    React-based; the RedwoodSDK guide adds the first-party React Compiler as a Babel plugin on @vitejs/plugin-react, placed before the Cloudflare and RedwoodSDK plugins. (react-compiler)

    Code example

    Add the React Compiler as a Babel plugin on @vitejs/plugin-react, placed before the Cloudflare and RedwoodSDK plugins. Components then get automatic memoization without useMemo or useCallback.

    // vite.config.mts
    import { defineConfig } from "vite";
    import { redwood } from "rwsdk/vite";
    import { cloudflare } from "@cloudflare/vite-plugin";
    import react from "@vitejs/plugin-react";
    
    export default defineConfig({
      plugins: [
        react({
          babel: {
            plugins: ["babel-plugin-react-compiler"],
          },
        }),
        cloudflare({ viteEnvironment: { name: "worker" } }),
        redwood(),
      ],
    });

    Source: RedwoodSDK: React Compiler

  • Third-party, like 18 of the other 22 frameworks. 2 frameworks score higher.

    Show the how-to

    No first-party analyzer documented; RedwoodSDK is a Vite plugin, so the third-party route is a community visualizer such as rollup-plugin-visualizer. (hosting)

    Code example

    RedwoodSDK builds with Vite, so add rollup-plugin-visualizer to the plugins. The build writes stats.html with a treemap of the bundles.

    // vite.config.mts
    import { defineConfig, type PluginOption } from "vite";
    import { redwood } from "rwsdk/vite";
    import { cloudflare } from "@cloudflare/vite-plugin";
    import { visualizer } from "rollup-plugin-visualizer";
    
    export default defineConfig({
      plugins: [
        cloudflare({ viteEnvironment: { name: "worker" } }),
        redwood(),
        visualizer({ filename: "stats.html", gzipSize: true }) as PluginOption,
      ],
    });

    Source: rollup-plugin-visualizer: README

  • Manual, like 16 of the other 22 frameworks. 6 frameworks score higher.

    Show the how-to

    No first-party script-loading strategy documented; scripts go in the Document by hand, and the security page covers only the CSP nonce they need. (documents, security)

    Code example

    Write the tags in the Document yourself. An external script gets async, and an inline snippet needs the per-request rw.nonce to pass the CSP. Add the script's host to script-src in src/app/headers.ts.

    // src/app/Document.tsx
    export const Document = ({ rw, children }) => (
      <html lang="en">
        <head>
          {/* … */}
          <script async src="https://plausible.io/js/script.js" data-domain="books.example" />
        </head>
        <body>
          {children}
          <script nonce={rw.nonce}>
            {`window.plausible = window.plausible || function () { (plausible.q = plausible.q || []).push(arguments) };`}
          </script>
          <script>import("/src/client.tsx")</script>
        </body>
      </html>
    );

    Source: RedwoodSDK: Security · RedwoodSDK: Documents

  • Manual, like 8 of the other 22 frameworks. 14 frameworks score higher.

    Show the how-to

    Cloudflare Workers is the only documented host; no Node, Vercel or Netlify target is documented. (hosting)

    Code example

    The documented build targets Cloudflare Workers through @cloudflare/vite-plugin, and pnpm release deploys it. Staging and production are Wrangler environments. Another host would need an adapter you write yourself.

    // vite.config.mts
    import { defineConfig } from "vite";
    import { redwood } from "rwsdk/vite";
    import { cloudflare } from "@cloudflare/vite-plugin";
    
    export default defineConfig({
      plugins: [cloudflare({ viteEnvironment: { name: "worker" } }), redwood()],
    });
    pnpm release                           # production Worker
    CLOUDFLARE_ENV=staging pnpm release    # uses env.staging from wrangler.jsonc

    Source: RedwoodSDK: Hosting

  • Manual, like 16 of the other 22 frameworks. 6 frameworks score higher.

    Show the how-to

    No service worker support documented; the public assets guide shows only a <link rel="manifest"> tag. Hand-write the worker in public/ and register it from a client component. (public-assets)

    Code example

    Put a hand-written worker in public/ and register it from a client component rendered on every page.

    // public/sw.js
    const CACHE = "app-v1"; // change the name on each deploy
    
    self.addEventListener("fetch", (event) => {
      const { request } = event;
      if (request.method !== "GET" || new URL(request.url).origin !== location.origin) return;
      // Network first, so pages stay current. The cached copy answers when offline.
      event.respondWith(
        fetch(request)
          .then((response) => {
            const copy = response.clone();
            caches.open(CACHE).then((cache) => cache.put(request, copy));
            return response;
          })
          .catch(() => caches.match(request)),
      );
    });
    // src/app/components/RegisterServiceWorker.tsx
    "use client";
    import { useEffect } from "react";
    
    export function RegisterServiceWorker() {
      useEffect(() => {
        if ("serviceWorker" in navigator) navigator.serviceWorker.register("/sw.js");
      }, []);
      return null;
    }

    Source: Using Service Workers (MDN) · RedwoodSDK: Public Assets

1st-party scores 2 points, Experimental and Third-party 1, Manual 0. How scoring works

The port

The books demo app built with this framework, and where each branch is deployed.

Latest benchmark

Mobile Lighthouse lab results from PageSpeed Insights on : the median of 3 runs per host, averaged across the hosts listed. The benchmark page explains each metric and has every other framework.

RedwoodSDK: latest benchmark per build and page
BuildPathPerfFCPRaw FCPLCPTBTCLSSITTIDocHosts
Book list /
baseline/83(good)1.520.76(poor)4.56(good)0(good)0.0002.174.561963/3 Vercel, Netlify, Cloudflare
optimized/88(good)0.910.31(needs improvement)3.96(good)0(good)0.0011.313.961253/3 Vercel, Netlify, Cloudflare
Book page /10145787
baseline/1014578794(good)1.511.01(needs improvement)2.98(good)0(good)0.0002.412.981913/3 Vercel, Netlify, Cloudflare
optimized/1014578796(good)1.011.29(needs improvement)2.63(good)0(good)0.0002.592.631443/3 Vercel, Netlify, Cloudflare
  • Good
  • Needs improvement
  • Poor

FCP 1.8 s / 3 s · LCP 2.5 s / 4 s · TBT 200 ms / 600 ms · CLS 0.1 / 0.25

Per host

The medians above before averaging. Runs is how many measured runs went into each median. Host names link to the deployment.

RedwoodSDK: latest benchmark per build, page and host
BuildPathHostPerfFCPRaw FCPLCPTBTCLSSITTIDocRunsStatus
RedwoodSDK
baseline/Vercel83(good)1.540.31(poor)4.66(good)0(good)0.0001.854.661193/3OK
baseline/Netlify82(good)1.511.35(poor)4.66(good)0(good)0.0002.934.661953/3OK
baseline/Cloudflare85(good)1.510.61(poor)4.36(good)0(good)0.0001.744.362733/3OK
baseline/10145787Vercel95(good)1.510.26(needs improvement)2.87(good)0(good)0.0001.512.871253/3OK
baseline/10145787Netlify93(good)1.511.38(needs improvement)3.03(good)0(good)0.0003.023.032183/3OK
baseline/10145787Cloudflare93(good)1.511.39(needs improvement)3.03(good)0(good)0.0002.693.032303/3OK
optimized/Vercel86(good)0.910.27(poor)4.21(good)0(good)0.0000.914.211003/3OK
optimized/Netlify90(good)0.910.36(needs improvement)3.60(good)0(good)0.0032.133.601503/3OK
optimized/Cloudflare87(good)0.910.30(poor)4.05(good)0(good)0.0000.914.051253/3OK
optimized/10145787Vercel96(good)0.911.26(needs improvement)2.73(good)0(good)0.0002.132.731443/3OK
optimized/10145787Netlify96(good)0.921.39(needs improvement)2.60(good)0(good)0.0003.002.602233/3OK
optimized/10145787Cloudflare97(good)1.221.23(needs improvement)2.56(good)0(good)0.0002.632.56663/3OK