pull/17121/merge
Davi Oliveira da Silva 20 hours ago committed by GitHub
commit 79348c0ba6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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'.

Loading…
Cancel
Save