Comment Comment by alskdjflaskjdhf Probably the equivalent would be a custom store, something like this: <script> import { writable } from "svelte/store"; function autoCounter(interval, initialValue = 0) { let { subscribe, update } = writable(initialValue); setInterval(() => update((n) => n + 1), interval); return { subscribe } } let counter = autoCounter(1000); </script> <div>The count is: {$counter}</div> parent alskdjflaskjdhf 4 years ago