First look at Signals in Angular

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • 💥 Become a PRO with my in-depth Angular Forms Course💥
    🔗 10% discount for the first 10 students - bit.ly/advanced-ng-forms-disc...
    The very first prototype of Signals was recently merged into the main Angular branch and available in Developer Preview Mode since Angular version 16.next.1. In this video, I will talk a little bit about the motivation to have reactive primitives in the core of the framework and how we as developers can benefit from it. I hope it will be interesting for you. Please share this video if you like it.
    🕒 Time Codes:
    00:00:00 - Intro;
    00:00:41 - Ad Integration - How to become an Expert in Angular Forms;
    00:01:55 - Motivation to have Signals;
    00:07:04 - Signals in Action;
    00:16:00 - Recap;
    00:18:00 - Outro;
    🙌 Join the discussion about Signals you can on Angular GitHub
    github.com/angular/angular/di...
    💡 Short Frontend Snacks (Tips) every week here:
    Twitter - / decodedfrontend
    Instagram - / decodedfrontend
    LinkedIn - / dmezhenskyi
  • Věda a technologie

Komentáře • 116

  • @DecodedFrontend
    @DecodedFrontend  Před rokem +7

    💥 Start to develop Angular Forms like a PRO with my in-depth Course💥
    🔗 10% discount for the first 10 students - bit.ly/advanced-ng-forms-10

    • @mukeshm280
      @mukeshm280 Před rokem

      Can I get a coupon code?

    • @DecodedFrontend
      @DecodedFrontend  Před rokem

      @@mukeshm280yes, just write me at dmytro@decodedfrontend.io

    • @luqeckr
      @luqeckr Před rokem

      is there any certificate (of completition at least) after finishing the course?

    • @DecodedFrontend
      @DecodedFrontend  Před rokem

      @@luqeckr Hi! yes, there is a certificate of completion

  • @vitaliiploshchynskyi2770

    Дякую, Дмитре, саме вирішив познайомитись з новинками 16 версії і тут такий подарунок!!!)😍

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +3

      Заходьте ще 😉 подарунків ще буде багато 😁

  • @AlainBoudard
    @AlainBoudard Před rokem +9

    Excellent presentation as always ! Thanks for the great content 😎

  • @haroldpepete
    @haroldpepete Před rokem +2

    when the master talk about something new about angular, students just listen and learn, you're in a point where i only believe in your videos and all that things you show me in angular, keep it real

  • @julienwickramatunga7338
    @julienwickramatunga7338 Před rokem +4

    Thank you for the clear explanations and code samples!
    Can't wait for this feature to be released as stable, as you said, it will be a nice way for Angular to become more attractive to newcomers 🙂

  • @josephsackeykontor4138
    @josephsackeykontor4138 Před rokem +2

    I love this change. Thanks for the clear explanation

  • @yuriinadilnyi3029
    @yuriinadilnyi3029 Před rokem +2

    As always well done 👍

  • @zhdanvadim9536
    @zhdanvadim9536 Před rokem +1

    Thanks for the new video!

  • @asifnawazmiani
    @asifnawazmiani Před rokem +1

    Well, no words than just Love you bro, just damn stuck on your channel hehe, for this kind of detailed videos on Angular ❤️

  • @gagiksimonyan3782
    @gagiksimonyan3782 Před rokem +1

    thanks for another useful video, Dmytro ;)

  • @magda77850
    @magda77850 Před rokem +6

    great introduction to signals! Thanks 😄
    can't wait to see next video about change detection 😉

  • @mahendranath2504
    @mahendranath2504 Před rokem +1

    Thank you so much for the amazing content, subscribed and liked🙌🙌👌👌😍😍👍👍

  • @XFuriousGamming
    @XFuriousGamming Před rokem

    This is great content. Keep it up!

  • @balajibalamurugan8053
    @balajibalamurugan8053 Před rokem +1

    I was waiting for this video, Finally 🤩

  • @mehmeh533
    @mehmeh533 Před rokem

    Love it!

  • @oleksandrvorovchenko8674

    Thanks! Well done.

  • @nelson3391
    @nelson3391 Před rokem

    Thanks! Excellent content!

  • @Hariharan0606
    @Hariharan0606 Před rokem +1

    Thanks a lot for this video !! waiting for change detection :)

  • @mouazalkhodari6407
    @mouazalkhodari6407 Před rokem

    very lovely and self explained video
    thank you keep going

  • @povezlo46
    @povezlo46 Před rokem +1

    With each new video the design of your room looks better and better))

  • @zaktreister1995
    @zaktreister1995 Před 11 měsíci

    Thanks King!

  • @TravisSomaroo
    @TravisSomaroo Před rokem

    Great content!

  • @lhargil
    @lhargil Před rokem +1

    Thank you very much for a very good explanation!

  • @ivandynysiuk4341
    @ivandynysiuk4341 Před 5 měsíci

    Thanks for the clear explanation 😎

  • @Aliakbaresmaeiliiii
    @Aliakbaresmaeiliiii Před měsícem

    there is no word to say for this good video❤💙

  • @ommo289
    @ommo289 Před rokem

    thanks Dmytro for nice presentation!

  • @darwinwatterson1732
    @darwinwatterson1732 Před rokem +3

    Finally! I was waiting for this video. Thanks a lot for you dedication!

  • @srushtidaware7978
    @srushtidaware7978 Před rokem +4

    This resembles me towards React's state variable(signal in angular) and useEffect(effect in angular)

    • @d34d10ck
      @d34d10ck Před 9 měsíci

      Or the upcoming runes in Svelte 5. It's all the same basically.

  • @ilyabielov9864
    @ilyabielov9864 Před rokem +2

    Дякую :)

  • @TheoLeChnow
    @TheoLeChnow Před rokem +1

    great video thx :)

  • @MoMoadeli
    @MoMoadeli Před 7 měsíci

    Thanks!

  • @MrKOHKyPEHT
    @MrKOHKyPEHT Před rokem

    Since angular 16 is coming I've decided to watch this video again...and again...and again (just in case) :)

  • @ihoryanovchyk
    @ihoryanovchyk Před rokem +2

    Thanks, Kozache!

  • @TuHoang-jt8lf
    @TuHoang-jt8lf Před rokem

    It like a new Angular and I have to learn from scratch again

  • @volodymyrusarskyy6987
    @volodymyrusarskyy6987 Před rokem +1

    This is like a mix of old EmberJs and KnockoutJs

  • @nephilimson
    @nephilimson Před rokem +2

    Great presentation
    but I'm still curious how the compute and effect know the signals have changed in their callbacks. Appreciate it if you could make a video of how the signal and hooks work under the hood
    Thanks

  • @afsirlaghari3738
    @afsirlaghari3738 Před rokem

    Thank you, dear...Me, watching your videos from Pakistan.

  • @ivanperun3565
    @ivanperun3565 Před rokem +1

    Thank you for video ). What about template rendering ? If I use onPush strategy and ngZone: noop (zoneless), signals don't update in template, I should use cdRef.detectChanges() for rerender compnent template. Maybe I didn't fully understand, but how does the template know if the signal has been updated without using zones. I do not want overendering , need to render only specific component or some scope of component (also used rx-angular/template).

  • @jediampm
    @jediampm Před rokem +4

    Hi, thanks for the video.
    As Angular dev since version 2+ used in professional projects , for me is a big BREAKING CHANGES and BS.
    They should choose the svelte way, which in terms of DX is better as much close to what exist now.
    They choose the solidjs / vue way, in my opinion wrong. if this is accepted and moved to stable, i will have to make a choice, which will be to find another job and choose another framework. Because i will not waste my time to learn this and to update the company app to use this hell verbose BS syntax. this will be the real end of this framework because they didnt learn what happen with angularjs to angular 2.. A lot dev switch from angularjs to react or vue. Good luck to all still Angular devs. ;)

  • @yogeshalwani9256
    @yogeshalwani9256 Před rokem +2

    like observable, does signal need to be destroyed or unsubscribed when view destroyed ?
    are angular teams sure about no consequences like an observable leak will occur while using the signal over than rxjs ?
    I am very excited to use this on behalf of the component store of ngrx.

  • @michalwroblewskimobi
    @michalwroblewskimobi Před rokem +11

    KnockoutJS, we meet again

  • @miroslavjakovcic4585
    @miroslavjakovcic4585 Před 5 měsíci

    Nice. Do you have any recommendation on how to employ Signals for input fields in reactive forms, especially with custom validation?

  • @mihaioltean6008
    @mihaioltean6008 Před rokem +15

    Hey Dymtro, this one came exactly on time. I was trying to understand what's with the hype and you provided a clear explanation to me. Thanks!
    Got two questions:
    1.) Usually, when we transform a value in the template we usually do it through pure pipes in order to avoid unnecessary change detection. Do you think that signals will make pipes obsolete?
    2.) Isn't there a chance of circular dependency between computed signals? I wonder if it will be marked in a way at build time or through lint

    • @genyklemberg
      @genyklemberg Před rokem +1

      whant to know also

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +3

      Hi :) Thanks for your questions.
      1) Well, I don't think that pipes will become obsolete. Optimization of CD isn't their direct responsibility, they are being used in order to transform data in a template and the pipe doesn't care if the value comes from Signal, class property, or from another pipe (e.g async pipe).
      2) Good question. I think this question is better to ask maybe here github.com/angular/angular/discussions/49090 because frankly speaking, the topic is very new and I don't have enough knowledge yet to answer this question :)

    • @hfspace
      @hfspace Před rokem

      nice questions!

  • @ihor-pidhornyi
    @ihor-pidhornyi Před rokem +5

    Great overview, thank you! It could be great to see how signals will look with different components comunications on different levels. For istance, via services or how it'll look with @Input ? Do we need to write setter in case to set signal from parent to child? And it seems great this will reduce amount of async pipes in templates and takeUntils in component code. As I see, it'll also reduce amount of rxjs code, for example we can all forget about combineLatest, and just use signals in the effect and in the computed. Correct me if I'm wrong)

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +3

      Yes, you are right 🙌 about @Inputs() and signals there will be information soon 😉

  • @beeTechSE
    @beeTechSE Před 8 měsíci

    Hi, dear Dmytro.
    Would you please create another video about signals and describe the new APIs that have been added to it?
    I cannot wait until you create that video.

  • @yufgyug3735
    @yufgyug3735 Před rokem +2

    does angular 16 still contain zonejs? if yes, what happens if we use this predicted api to convert signal to observable - does it trigger old change detection based on zonejs, or are we staying on signal based system, since underlaying values are emitted by a signal?

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +1

      I can say for sure that zonejs will stay in the next major releases because migration and adoption of signals will take a decent amount of time. Regarding how it will work exactly I can't say now because this feature wasn't even pushed to the Angular repo yet :) I think things will become a bit clearer when the angular core team will publish the first RFC.

  • @moegreen8543
    @moegreen8543 Před 5 měsíci +1

    Are there already any standards (generally accepted rules) for writing variable names for signals?

  • @dennis87ist
    @dennis87ist Před 8 měsíci +1

    Hi Dmytro! In my application I declared a lot of variable as Observable. Can signals be used to replace Observable?

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +1

      it depends :) Currently, there is a consensus that Signals are good for synchronous reactivity and observables are good for scenarios when you have to deal with async stuff e.g. events, http calls, etc. So I would say that it is better to use both.

  • @Chantimedidi
    @Chantimedidi Před 11 měsíci

    Bro can you please explain about component store?

  • @orzohar3483
    @orzohar3483 Před 10 měsíci

    Hey Dmytro, do you think Angular will be relevant in the future? i see a major decrease in 2022 and in 2023.

  • @AlphaFrog1021
    @AlphaFrog1021 Před rokem +1

    wouldn’t accessing signal value with function call in template cause problems with cd?

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +1

      No, it is fine to use signals like that. By the way, functions in the template are also safe to use unless those functions do some expensive computations, loops, etc

  • @atmn_pawel
    @atmn_pawel Před rokem +3

    do you have ngZone: 'noop" set in this demo ?

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +3

      No, I didn't do that. Currently, signals work in the context of ZoneJs. A new CD mechanism will come in a bit later.

  • @hfspace
    @hfspace Před rokem +1

    signals seem promising for sure, although i like my piped observables :-)

  • @vishwajeetsavandkar7617

  • @alexandrefaustino2448
    @alexandrefaustino2448 Před rokem +1

    So what is the actual peformance gain. So Signal do not need a | async pipe in order to be updated. ChangeDetectionStrategy will be remove ?

    • @DecodedFrontend
      @DecodedFrontend  Před rokem

      Yes. No need for an async pipe. ChangeDetectionStrategy flag will (most probably) become obsolete in the future. One of the reasons for performance gain will be that Angular will do Change Detection only for components where their data model has changed.

  • @The14Some1
    @The14Some1 Před 8 měsíci

    13:34 the way you wrote this effect was very misleading and confusing. I was forced to check if it makes sense on preactjs myself.

  • @SheriffZmroka
    @SheriffZmroka Před rokem +1

    There are some really cool things in your videos. Have you thought about running courses on global platforms like Udemy? I found out about your channel by accident and I think they will be popular on Udemy.

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +2

      Hi :) I actually hosted my courses on Udemy some time ago but I intentionally moved from there because Udemy has terrible conditions for course authors.

    • @SheriffZmroka
      @SheriffZmroka Před rokem

      @@DecodedFrontend Hmm. Maybe then the egghead platform? Because the content is really good, and it needs to be popularized.

  • @indrarajyadav528
    @indrarajyadav528 Před rokem +2

    It looks similar to knockout binding

  • @YehorKanaiev
    @YehorKanaiev Před rokem

    Це як async в компоненті.
    Але ось я не сильно розумію, як сигналом можна буде замінити RxJS. Там же так багато операторів. І скажімо observable зараз добре притосований для http запитів, коли можна купу кейсів покрити різними операторами.
    Скажімо можна було б зробити бібліотеку, яка б при створенні http запиту приймала 2 агрументи: сигнал і error колбек.
    Ця звязка була б легшою чим rxjs, але менш функціональна.

  • @_dinesh
    @_dinesh Před rokem

    Thank you for the great video. I dont like the syntax.. signal, effect and compute it looks a little weird. Very react-ish..

  • @ghkpr
    @ghkpr Před rokem

    tldr, angular is now react?

  • @LeungWong
    @LeungWong Před rokem

    The style of signal make Angular look kind of similar to React. signal would be similar to useState, and effect would be similar to useEffect. Technically maybe they are different thing, at least for signal. But the way of writing the code feels a bit React.

    • @zhandosainabek
      @zhandosainabek Před rokem

      And "computed" thing looks like VueJs :)

    • @damiankowalski8541
      @damiankowalski8541 Před rokem

      I feel the same way, except I think with signals you do not have to explicitly state the dependencies

  • @josemiguelochoa5372
    @josemiguelochoa5372 Před rokem +1

    Yo.. When did Luka Doncic become a software developer 🤔

  • @user-jd2mo5xm3b
    @user-jd2mo5xm3b Před rokem +2

    Have been using Angular since v4 and Zone js was never been a real pain in terms of cd, I just turn it off by default with noop bootstrap option, thats it.
    The main flaw of using zone js in Angular is much wider and no one really talking about it, it is the fact that zone js initializing in browser swaps some native code functions with its wrappers and if Angular is the only app on the page it is not noticeable, but if there are more apps on the page with different technologies, plugins or microfrontends, then they all become using those patched functions, because they are share the same window api, even worse in scenario when some another app initialized its things with native code, then zone js appears and in the middle swaps window api and ZoneAwarePromise error could appear in sibling apps, etc. Even the fact that you developing some code modules relying on native api, testing it, then realize it is swapped in runtime with something different, somehow magically working indeed but it is not something what you expecting.

  • @sergeymois6302
    @sergeymois6302 Před rokem

    Дякую за вашу роботу. Можливо вам буде в нагоді почути як нейтіви вимовляють слова process, mechanism .

  • @bornathepicek
    @bornathepicek Před rokem

    Why is Luka Doncic teaching me about Angular?

  • @kumarvadivel4328
    @kumarvadivel4328 Před rokem +2

    this very much unwanted feature in angular. which complicates the understandablity metric of the framework

    • @DecodedFrontend
      @DecodedFrontend  Před rokem

      Thank you for your feedback :) maybe it is just a first impression😉

  • @sabasojoodi6344
    @sabasojoodi6344 Před rokem

    Hello please set Persian subtitles for your videos 🙏

  • @stanisawgolinski3244
    @stanisawgolinski3244 Před rokem +1

    Wait... it's look like Vue component xD

  • @piotrbrokowski4703
    @piotrbrokowski4703 Před rokem +1

    like in the blind

  • @juraganpisang6982
    @juraganpisang6982 Před rokem

    goodbye subscribe hell observable

  • @genyklemberg
    @genyklemberg Před rokem +2

    Say bye to newcomers, they are way far away from Angular now)))

  • @ravijsoni2477
    @ravijsoni2477 Před rokem

    It's not a big thing. It's built on top of Reactive Extensions Library for Js. Anyone can create their own custom signals. LOL

  • @aaronkoller8811
    @aaronkoller8811 Před rokem +2

    ExpressionChangedAfterItHasBeenChecked -- Ugh. Less of this is better for everyone!

  • @unhandledexception1948

    annoying to see that angular is adopting a dumbed down react / vue style paradigms when it already had a superior approach to reactivity

  • @user-gi9pm8hm9f
    @user-gi9pm8hm9f Před rokem

    Дякую! Слава Україні!

  • @namename123
    @namename123 Před rokem +1

    You can update Angular to 16, even if the current latest version is 15? :O :O :O

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +1

      Angular 15 is the last stable version but you can manually define any “next”,”beta”,”release-candidate” version 😊