Skip to content

Commit 58b1157

Browse files
author
Rich Harris
committed
tweak
1 parent b037d0e commit 58b1157

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

content/tutorial/01-svelte/08-stores/03-readable-stores/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Open `stores.js`. The first argument to `readable` is an initial value, which ca
88

99
```js
1010
/// file: stores.js
11-
export const time = readable(new Date(), function start(set) {
12-
const interval = setInterval(() => {
11+
export const time = readable(+++new Date()+++, function start(set) {
12+
+++ const interval = setInterval(() => {
1313
set(new Date());
14-
}, 1000);
14+
}, 1000);+++
1515

1616
return function stop() {
17-
clearInterval(interval);
17+
+++clearInterval(interval);+++
1818
};
1919
});
2020
```
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { readable } from 'svelte/store';
22

33
export const time = readable(null, function start(set) {
4-
// implementation goes here
4+
// setup code goes here
55

6-
return function stop() {};
6+
return function stop() {
7+
// teardown code goes here
8+
};
79
});

0 commit comments

Comments
 (0)