Loading topic
toSignal and `toObs8 min readinject(), create signals with signal() and computed(), and use basic RxJS (Observable, subscribe, map, switchMap). You don't need to know how toSignal and toObservable work yet. This chapter explains one rule that decides6 min readsignal() and computed(), and that you know basic RxJS (Observable, subscribe, map, switchMap) and TypeScript generics. The previous chapters explained when to7 min readtoSignal has to bridge that gap, and the initialValue and requireSync options are how you choose to do it. This chapter covers what each option does, how it changes the signal's type, and what goes wrong when you p6 min readmap, switchMap and catchError. It also assumes you know that toSignal from @angular/core/rxjs-interop subscribes to an observable and exposes the latest value as6 min readtoSignal subscribes to an observable, what ends that subscription, and when you should take over cleanup yourself. It assumes you can create a component with injected services and use signal() and computed(). It also assumes you know how subscribe, unsubscribe and 6 min readsignal() and computed(). It also assumes you know basic RxJS (subscribe, map, switchMap) and what an injection context is. The previous chapters covered toSignal. Here you go the other way: you take a signal and make it a stream t6 min readsignal() and computed(), and that you know basic RxJS (subscribe, map, switchMap). It also assumes you have met toObservable and know it must run in an injection context. The chapter explains when toObservable emits, which value6 min readtoObservable and toSignal in one feature, a search box that waits for the user to pause typing and then calls an API.6 min readsignal() and computed(). It also assumes you know basic RxJS (map, switchMap, catchError) and have met toSignal and toObservable in the earlier chapters. Here you will learn the mistakes that cause most int7 min readtoSignal and toObservable is harder to test than code that uses only one of them. Three things get in the way. The interop functions need an injection context. toObservable emits from an effect, so it only emits when effects run. RxJS time operators such as debounceTime need a5 min read