mirror of https://github.com/sveltejs/svelte
parent
d5bca1140f
commit
157472ff16
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
import { onDestroy } from 'svelte';
|
||||
|
||||
export let my_prop;
|
||||
|
||||
onDestroy(() => {
|
||||
console.log(my_prop.foo);
|
||||
});
|
||||
</script>
|
||||
|
||||
{my_prop.foo}
|
||||
@ -1,10 +0,0 @@
|
||||
<script>
|
||||
let { checked = $bindable(), count = $bindable() } = $props();
|
||||
$effect(() => ()=>{
|
||||
console.log(count, checked);
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>{count}</p>
|
||||
|
||||
<button onclick={()=> count-- }></button>
|
||||
Loading…
Reference in new issue