























An experimental SSR framework for Svelte 5 and Bun.
Render everything on the server; ship JavaScript only where it earns its place.
Setup, hydration modes, routes, hooks, forms, cookies — everything in one place.
Start reading →Each demo lives on its own page. Pick one below to see the feature in isolation.
Hello World
The simplest possible Mochi page — pure server-rendered Svelte.Hydration Modes
The same component rendered five ways — eager, lazy, visible, rootMargin-tuned, and deferred server island.Shared State
Two separate islands sharing the same reactive $state.Server Islands
Components marked mochi:defer render server-side on demand after the initial page is delivered.Crossing the server-client boundary with props
How props travel from a server-rendered parent into a hydrated island — Date, Map, Set, BigInt, URL, typed arrays, and even cyclic refs survive devalue’s round-trip.Lazy Islands
Islands marked mochi:hydrate:visible hydrate and load their CSS only when scrolled into view.Lazy Server Islands
Server islands marked mochi:defer:visible only fetch when the wrapper scrolls into view.Font loading
Ship fonts via @fontsource packages or standalone .woff2 files — automatically bundled and linked from the page head.MdSvex
A .md file compiled through mdsvex and rendered as a Svelte component, with an embedded <script> block.Nested Components
A five-level recursive tree — hydrating the root carries the whole subtree in one island.Shared Props
Nine islands, three unique payloads — each set serialized once and referenced via props-ref.此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。