mirror of https://github.com/sveltejs/svelte
parent
ae4767a4dc
commit
102d28fb12
@ -0,0 +1,9 @@
|
||||
import { writable } from '../../../../store.js';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
count: writable(0)
|
||||
},
|
||||
|
||||
error: `The $ prefix is reserved, and cannot be used for variable and import names`
|
||||
};
|
@ -0,0 +1,6 @@
|
||||
<script>
|
||||
export let count;
|
||||
let $count;
|
||||
</script>
|
||||
|
||||
<button on:click="{() => count.update(n => n + 1)}">count {$count}</button>
|
Loading…
Reference in new issue