Skip to content

Commit e311f3d

Browse files
diegoinost02alxhub
authored andcommitted
docs: clarify linkedSignal update behavior
Updates the linkedSignal documentation to specify that it updates its value when the source changes or when any signal referenced in the computation changes, ensuring the description accurately reflects its behavior.
1 parent abcd6b5 commit e311f3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

adev/src/content/guide/signals/linked-signal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class ShippingMethodPicker {
104104

105105
When you create a `linkedSignal`, you can pass an object with separate `source` and `computation` properties instead of providing just a computation.
106106

107-
The `source` can be any signal, such as a `computed` or component `input`. When the value of `source` changes, `linkedSignal` updates its value to the result of the provided `computation`.
107+
The `source` can be any signal, such as a `computed` or component `input`. The `linkedSignal` updates its value when the `source` changes or when any signal referenced in the `computation` changes, updating its value with the result of the provided `computation`.
108108

109109
The `computation` is a function that receives the new value of `source` and a `previous` object. The `previous` object has two properties— `previous.source` is the previous value of `source`, and `previous.value` is the previous value of the `linkedSignal`. You can use these previous values to decide the new result of the computation.
110110

0 commit comments

Comments
 (0)