docs: clarify $bindable fallback binding requirement (#18477)

pull/18685/head
Barry 3 days ago committed by GitHub
parent 06c9b7929a
commit 8bf9ec8700
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -52,3 +52,5 @@ In this case, you can specify a fallback value for when no prop is passed at all
/// file: FancyInput.svelte
let { value = $bindable('fallback'), ...props } = $props();
```
When a bindable prop has a fallback value, the parent must pass a value other than `undefined` if it uses `bind:`. This avoids ambiguity about which value should apply, since the parent and child should share the same value for a binding.

Loading…
Cancel
Save