mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
321 B
18 lines
321 B
7 years ago
|
<script>
|
||
6 years ago
|
import { beforeUpdate } from 'svelte';
|
||
6 years ago
|
import Nested from './Nested.svelte';
|
||
7 years ago
|
|
||
6 years ago
|
export let snapshots;
|
||
|
export let visibleThings = [];
|
||
7 years ago
|
|
||
6 years ago
|
beforeUpdate(() => {
|
||
|
if (!snapshots) {
|
||
|
// first run
|
||
|
snapshots = [];
|
||
|
}
|
||
7 years ago
|
|
||
6 years ago
|
snapshots.push(visibleThings);
|
||
|
});
|
||
|
</script>
|
||
7 years ago
|
|
||
6 years ago
|
<Nested bind:visibleThings={visibleThings} />
|