Skip to content

Commit

Permalink
Add another level of nested sub-component
Browse files Browse the repository at this point in the history
  • Loading branch information
floehopper committed Sep 20, 2024
1 parent 24452ba commit 09c1de5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/home/AnotherComponent.html.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>AnotherComponent</p>
4 changes: 4 additions & 0 deletions app/views/home/MyComponent.html.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script>
import AnotherComponent from "./AnotherComponent.html.svelte";
let count = 0;
const increment = () => {
Expand All @@ -9,3 +11,5 @@
<p>{count}</p>

<button on:click|preventDefault={increment}>Increment</button>

<AnotherComponent></AnotherComponent>

0 comments on commit 09c1de5

Please sign in to comment.