Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions documentation/docs/02-runes/06-$bindable.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Ordinarily, props go one way, from parent to child. This makes it easy to unders

In Svelte, component props can be _bound_, which means that data can also flow _up_ from child to parent. This isn't something you should do often, but it can simplify your code if used sparingly and carefully.

> [!NOTE] `$bindable` enables bidirectional bindings between components. While convenient, it should be used with care — frequent use can make your data flow unpredictable and your components harder to maintain. In most cases, prefer one-way data flow and explicit updates through events or stores.

It also means that a state proxy can be _mutated_ in the child.

> [!NOTE] Mutation is also possible with normal props, but is strongly discouraged — Svelte will warn you if it detects that a component is mutating state it does not 'own'.
Expand Down