Skip to content

Commit 3f7e5b0

Browse files
committed
add note on fallback props
1 parent 95a020a commit 3f7e5b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/docs/02-runes/05-$props.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ On the other side, inside `MyComponent.svelte`, we can receive props with the `$
3737

3838
## Fallback values
3939

40-
Destructuring allows us to declare fallback values, which are used if the parent component does not set a given prop:
40+
Destructuring allows us to declare fallback values, which are used if the parent component does not set a given prop (or the value is `undefined`):
4141

4242
```js
4343
let { adjective = 'happy' } = $props();
@@ -219,4 +219,4 @@ This is useful for linking elements via attributes like `for` and `aria-labelled
219219
<label for="{uid}-lastname">Last Name: </label>
220220
<input id="{uid}-lastname" type="text" />
221221
</form>
222-
```
222+
```

0 commit comments

Comments
 (0)