You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/content/tutorial/01-introduction/05-nested-components/text.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,21 @@
2
2
title: Nested components
3
3
---
4
4
5
-
It would be impractical to put your entire app in a single component. Instead, we can import components from other files and include them as though we were including elements.
5
+
It would be impractical to put your entire app in a single component. Instead, we can import components from other files and then use them as though we were including elements.
6
6
7
-
Add a `<script>` tag that imports `Nested.svelte`...
7
+
We now present you 2 files in the editor on the right (upper bar) to click on, `App.svelte` and `Nested.svelte`.
8
+
9
+
Each `.svelte` file holds a component that is a reusable self-contained block of code that encapsulates HTML, CSS, and JavaScript that belong together.
10
+
11
+
Let's add a `<script>` tag to `App.svelte` that imports the file (our component) `Nested.svelte` into our app...
0 commit comments