Skip to content

Commit a398f5a

Browse files
committed
Add default data to Circles example
1 parent e88e115 commit a398f5a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Circles.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
// https://svelte.dev/tutorial/transition
55
import { fly } from "svelte/transition";
66
7-
// here we declare `data` as a prop that this component can expect
7+
// here we declare `data` as a prop that this component can expect. it has
8+
// a default value in case we don't provide anything
89
// https://svelte.dev/tutorial/declaring-props
9-
export let data;
10+
export let data = [5, 15, 10, 12, 14];
1011
1112
// prefix a statement with $: to make it reactive (so it runs every time
1213
// data changes)

0 commit comments

Comments
 (0)