From 978830e5ee6ecf3e86004b6279be0d936770fb93 Mon Sep 17 00:00:00 2001 From: barry <91018388+barry166@users.noreply.github.com> Date: Sun, 28 Jun 2026 13:53:05 +0800 Subject: [PATCH] Clarify bindable fallback requirements The `$bindable` rune page already shows fallback values but did not repeat the runes-mode constraint documented in the Svelte 5 migration guide. This adds the missing note directly where users learn `$bindable`, so readers do not need to discover the non-undefined binding requirement elsewhere. Constraint: Keep the change documentation-only and aligned with the existing migration guide language Rejected: Add runtime linting behavior | issue only asks for docs and lint design would need maintainer discussion Confidence: high Scope-risk: narrow Directive: Do not expand this PR into runtime validation without maintainer direction Tested: corepack pnpm lint Tested: corepack pnpm test Not-tested: corepack pnpm check blocked by local pnpm 11 lifecycle build-approval issue during nested install --- documentation/docs/02-runes/06-$bindable.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/docs/02-runes/06-$bindable.md b/documentation/docs/02-runes/06-$bindable.md index 3675a56b1677..a3be662785ba 100644 --- a/documentation/docs/02-runes/06-$bindable.md +++ b/documentation/docs/02-runes/06-$bindable.md @@ -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.