Tag: inertiajs

How to do polling in Svelte and InertiaJS

Just a quick snippet about how to do polling the Svelte way. import { onDestroy } from "svelte" let interval const poll = () => { clearTimeout(interval) Inertia.reload() interval = setTimeout(poll, 1000) } poll() onDestroy(() => clearTimeout(interval)) …