mirror of https://github.com/sveltejs/svelte
19 lines
376 B
19 lines
376 B
<script>
|
|
import { count } from './stores.js';
|
|
import Incrementer from './Incrementer.svelte';
|
|
import Decrementer from './Decrementer.svelte';
|
|
import Resetter from './Resetter.svelte';
|
|
|
|
let countValue;
|
|
|
|
const unsubscribe = count.subscribe((value) => {
|
|
countValue = value;
|
|
});
|
|
</script>
|
|
|
|
<h1>The count is {countValue}</h1>
|
|
|
|
<Incrementer />
|
|
<Decrementer />
|
|
<Resetter />
|