Skip to content

Commit

Permalink
docs: added note about toSignal
Browse files Browse the repository at this point in the history
  • Loading branch information
ApplY3D committed Mar 22, 2024
1 parent 5bd188a commit ad38e11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aio/content/guide/rxjs-interop.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export class Ticker {
Like the `async` pipe, `toSignal` subscribes to the Observable immediately, which may trigger side effects. The subscription created by
`toSignal` automatically unsubscribes from the given Observable upon destruction of the component in which `toSignal` is called.

### Injection context

`toSignal` by default needs to run in an [injection context](/guide/dependency-injection-context), such as during construction of a component or service. If an injection context is not available, an `Injector` can instead be explicitly specified.

### Initial values

Observables may not produce a value synchronously on subscription, but signals always require a current value. There are several ways to deal with this "initial" value of `toSignal` signals.
Expand Down

0 comments on commit ad38e11

Please sign in to comment.