Skip to content

Commit f2029ff

Browse files
authored
[docs] Improve clarity of 2 files to edit and improve learning (#7285)
1 parent 0c1bfcb commit f2029ff

File tree

1 file changed

+7
-3
lines changed
  • site/content/tutorial/01-introduction/05-nested-components

1 file changed

+7
-3
lines changed

site/content/tutorial/01-introduction/05-nested-components/text.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
title: Nested components
33
---
44

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.
66

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...
812

913
```html
1014
<script>
1115
import Nested from './Nested.svelte';
1216
</script>
1317
```
1418

15-
...then add it to the markup:
19+
...then use component `Nested` in the app markup:
1620

1721
```html
1822
<p>This is a paragraph.</p>

0 commit comments

Comments
 (0)