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.
svelte/test/runtime/samples/key-block-component-slot/main.svelte

17 lines
282 B

<script>
import Component1 from './Component1.svelte'
import Component2 from './Component2.svelte'
let reset = false
export let logs;
</script>
<Component1>
{#key reset}
<Component2 {logs} />
{/key}
</Component1>
<button on:click={() => reset = !reset}>
Reset!
</button>