API Endpoints
You can build JSON routes with Mochi.api().
+
Click an endpoint to test it
<script>
import ApiTester from './ApiTester.svelte';
import { files } from './files.ts';
const sources = await loadSources(files);
</script>
<ApiTester mochi:hydrate />
More demos
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. Lazy Islands Islands marked mochi:hydrate:visible hydrate and load their CSS only when scrolled into view.