Real-time Streams
A WebSocket clock and a Server-Sent Events clock side by side. The component hydrates lazily — JS and CSS load only when it scrolls into view.
WebSocket connecting
--:--:-- /ws/timeSSE connecting
--:--:-- /sse/timeisland-id: mochi-y1cpPP3t-0
<script>
import RealtimeClocks from './RealtimeClocks.svelte';
</script>
<RealtimeClocks mochi:hydrate:visible={{ rootMargin: '100px' }} />
More demos
Cache Events Custom subscriber pipes MochiCache lifecycle events into an in-memory ring buffer. Reloading associated form data After a successful submit, refetch the related list — or rely on the post-POST page re-render. Error Handling User-provided error page + handleError hook for 404s and uncaught render errors.