Skip to content

Commit 1aaa460

Browse files
committed
Update computed.md
1 parent 4d3e2dc commit 1aaa460

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

website/src/content/docs/async/computed.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,31 @@ Streams and Futures are the most common async signals, but sometimes you need to
1111

1212
## computedAsync
1313

14-
Async Computed is syntax sugar around [FutureSignal].
14+
Async Computed is syntax sugar around FutureSignal.
1515

1616
_Inspired by [computedAsync](https://ngxtension.netlify.app/utilities/signals/computed-async/) from Angular NgExtension._
1717

18-
computedAsync takes a [callback] function to compute the value
19-
of the signal. This callback is converted into a [Computed] signal.
18+
computedAsync takes a callback function to compute the value
19+
of the signal. This callback is converted into a Computed signal.
2020

2121
```dart
2222
final movieId = signal('id');
2323
late final movie = computedAsync(() => fetchMovie(movieId()));
2424
```
25-
26-
**It is important that signals are called before any async gaps with await.**
25+
:::caution
26+
It is important that signals are called before any async gaps with await.
27+
:::
2728

2829
Any signal that is read inside the callback will be tracked as a dependency and the computed signal will be re-evaluated when any of the dependencies change.
2930

3031
## computedFrom
3132

32-
Async Computed is syntax sugar around [FutureSignal].
33+
Async Computed is syntax sugar around FutureSignal.
3334

3435
_Inspired by [computedFrom](https://ngxtension.netlify.app/utilities/signals/computed-from/) from Angular NgExtension._
3536

36-
computedFrom takes a list of [signals] and a [callback] function to
37-
compute the value of the signal every time one of the [signals] changes.
37+
computedFrom takes a list of signals and a callback function to
38+
compute the value of the signal every time one of the signals changes.
3839

3940
```dart
4041
final movieId = signal('id');

0 commit comments

Comments
 (0)