Converting Observables to Signals in Angular

Поділитися
Вставка
  • Опубліковано 26 лип 2024
  • Signals are changing the way we do many things in Angular. You’ve likely encountered observables if you’ve worked in the framework for very long. They’re a pretty handy way to stream values emitted over time to subscribers providing a way to react to these events as needed. But often, when using them, we also need to trigger change detection in order to properly update items within views. With signals, observables are not being replaced, they still have use cases, but we can actually transform them into signals when needed. This can help with change detection and can often simplify the code overall. In this video we’ll convert a couple of observables from an existing example over to signals. Alright, let’s check it out!
    ------------------------------------------------------------------------------
    📺 Related Videos:
    - Signal-Based Inputs and the Output Function ( • Signal-Based Inputs an... )
    - How to Utilize Angular CDK Breakpoint Observer ( • How to Utilize Angular... )
    ------------------------------------------------------------------------------
    💖 Help Support the Channel:
    If you found this helpful and want to show some love, you can always buy me a coffee (buymeacoffee.com/briantreese)!
    ------------------------------------------------------------------------------
    🔗 Demo Links:
    - Before (stackblitz.com/edit/stackblit...)
    - After (stackblitz.com/edit/stackblit...)
    ------------------------------------------------------------------------------
    📖 Chapters:
    0:00 - Introduction
    1:24 - The demo application
    2:15 - The Breakpoint Observer logic
    2:32 - Converting a Breakpoint Observer subscription monitoring a single breakpoint to a signal
    8:41 - Converting a Breakpoint Observer subscription monitoring multiple breakpoints to a signal
    10:50 - Conclusion
    ------------------------------------------------------------------------------
    #angular #angular_developer #angulartraining #javascript #typescript #frontend #angularcourse #signals #signal #angular_components #angular_cdk #cdk
  • Наука та технологія

КОМЕНТАРІ • 1

  • @Boilinglemon
    @Boilinglemon 3 місяці тому

    I'd like to watch you do a deep dive on how exactly signals can improve change detection/performance compared to getters or observables