From 81b6c0b9863cf4b68a01416c43ed8aca651f1a97 Mon Sep 17 00:00:00 2001 From: "Alessandro (Ale) Segala" <43508+ItalyPaleAle@users.noreply.github.com> Date: Mon, 25 May 2020 13:56:31 -0700 Subject: [PATCH] docs: adjust readable store example (#4903) --- site/content/docs/03-run-time.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 97eabd1146..460c393e7e 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -287,7 +287,9 @@ The second argument to `readable` is the same as the second argument to `writabl ```js import { readable } from 'svelte/store'; -const time = readable(new Date(), set => { +const time = readable(null, set => { + set(new Date()); + const interval = setInterval(() => { set(new Date()); }, 1000);