Performance: Why bindings enable two-way data flow
MEDIUM IMPACT
This affects interaction responsiveness and rendering efficiency by syncing UI and data automatically.
let name = ''; <input bind:value={name} />
let name = ''; <input value={name} on:input={e => name = e.target.value} />
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Manual input event handling | Multiple event listeners | 1 per input event | Moderate | [!] OK |
| Svelte bind:value directive | Single reactive update | 1 per input event | Low | [OK] Good |