Tag: inertiajs

Ako robiť polling v Svelte a InertiaJS

Len rýchly snippet o tom, ako robiť polling svelte štýlom. ``js import { onDestroy } from "svelte" let interval const poll = () => { clearTimeout(interval) Inertia.reload() interval = setTimeout(poll, 1000) } poll() onDestroy(() => clearTimeout(interval)) `` Dalo by sa to u...