Rebask is a React framework for Vite

With file-system routing, Server Components, streaming, and caching.

$ pnpm create rebask-app

Static shell, served from cacheStreamed per request

A framework in one plugin

Routing, rendering, and caching work together, partial prerendering by default.

React Server Components

Components run on the server by default and fetch their own data. Add "use client" where you need state, and only those components ship JavaScript.

  • ▪layout.tsxServer
  • └page.tsxServer
  • └<Reviews>Server
  • └<AddToCart>Client
Read the docs

File System Routing

Pages, layouts, and route handlers are files in app/. Nest layouts and use dynamic segments, catch-alls, and route groups.

  • app/page.tsx/
  • app/products/[id]/page.tsx/products/:id
  • app/docs/[...slug]/page.tsx/docs/*
  • app/(shop)/cart/page.tsx/cart
  • app/api/hello/route.ts/api/hello
Read the docs

Partial Pre-Rendering

Routes are prerendered into cached shells. A request gets the shell at once while its dynamic parts stream in.

Read the docs

Instant Navigations

Soft navigations fetch only missing segments. Links prefetch the shell in view and the full payload on hover.

Read the docs

Layered Caching

From page shells and data on the server to route segments in the browser. Each layer has its own lifetime and tags.

  • Page cacheHTML and PPR shellsServer
  • RSC cacheSegment payloadsServer
  • "use cache"Function resultsServer
  • Segment cacheRoute segmentsBrowser
Read the docs

What happens on a request

A page in production, from the first byte to the next click.

First request

  1. 1
    RequestGET /products/42 matches app/products/[id]/page.tsx.
  2. 2
    Page cacheThe cached shell for the route is found.
  3. 3
    ShellStatic HTML goes out first and the browser paints it.
  4. 4
    ResumePostponed parts render for this request.
  5. 5
    StreamEach result replaces its Suspense fallback.

Navigations

  1. 1
    In viewA visible link prefetches the route's shell.
  2. 2
    HoverIntent upgrades it to the full RSC payload.
  3. 3
    ClickThe page swaps in without a document reload.
  4. 4
    SegmentsOnly missing segments are fetched. Layouts stay.
  5. 5
    BackCached segments and their local state are restored.

Start a Rebask app

One command scaffolds a Vite app with a root layout and your first pages.

$ pnpm create rebask-app