Skip to content

Commit 67dc579

Browse files
authored
Update main.svelte
1 parent f0bb9c5 commit 67dc579

File tree

1 file changed

+0
-36
lines changed
  • packages/svelte/tests/runtime-runes/samples/non-local-mutation-with-binding-8

1 file changed

+0
-36
lines changed

packages/svelte/tests/runtime-runes/samples/non-local-mutation-with-binding-8/main.svelte

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -44,39 +44,3 @@
4444

4545
<CounterContext />
4646
<CounterBinding bind:linked3={linked3.current} bind:linked4={linked4.linked.current} />
47-
48-
<!-- <script>
49-
import { createPortalKey } from 'svelte';
50-
let x = createPortalKey();
51-
let count = $state(0);
52-
let root = $state();
53-
54-
$effect(() => {
55-
root = document.querySelector('#root');
56-
})
57-
</script>
58-
59-
<div>
60-
<svelte:portal for={x}></svelte:portal>
61-
</div>
62-
63-
<button onclick={() => count++}>increment</button>
64-
65-
<svelte:portal target={x}>
66-
hello {count}
67-
</svelte:portal>
68-
69-
{#if count < 5}
70-
<svelte:portal target={x}>
71-
<span>hello2 {count}</span>
72-
</svelte:portal>
73-
{/if}
74-
75-
<p></p>
76-
77-
<svelte:portal target="{root}">
78-
I'm rendered in the
79-
<button onclick={() => root = document.querySelector('p')}>
80-
{root === document.querySelector('#root') ? 'root' : 'p'}
81-
</button>
82-
</svelte:portal> -->

0 commit comments

Comments
 (0)