Skip to content

Commit

Permalink
site: clarify file -> module in <svelte:self> tutorial (sveltejs#5171)
Browse files Browse the repository at this point in the history
  • Loading branch information
João Paulo committed Jul 30, 2020
1 parent f4f16da commit a0ed704
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -14,12 +14,12 @@ It's useful for things like this folder tree view, where folders can contain *ot
{/if}
```

...but that's impossible, because a file can't import itself. Instead, we use `<svelte:self>`:
...but that's impossible, because a module can't import itself. Instead, we use `<svelte:self>`:

```html
{#if file.type === 'folder'}
<svelte:self {...file}/>
{:else}
<File {...file}/>
{/if}
```
```

0 comments on commit a0ed704

Please sign in to comment.