Are you using Angular Signal Effects in the RIGHT way?

แชร์
ฝัง

ความคิดเห็น • 13

  • @RainerHahnekamp
    @RainerHahnekamp 5 หลายเดือนก่อน +1

    Hey Zoaib, great video. Nice to see that you spread the message! 👍

    • @ZoaibKhan
      @ZoaibKhan  5 หลายเดือนก่อน +1

      Hey Rainer! Thanks to you for initiating the discussion on explicit effects. It's really helped me and others in understanding effects in a better way. More power :)

  • @nws551
    @nws551 2 หลายเดือนก่อน

    This was really helpful! Thanks!
    explicitEffect seems surprisingly close to react like syntax

    • @ZoaibKhan
      @ZoaibKhan  2 หลายเดือนก่อน

      Glad that you found it helpful. One caveat though is to still use it sparingly when needed. Angular team reportedly is working on more primitives related to signals to make use of effects minimal...

  • @MichaelSmallDev
    @MichaelSmallDev 5 หลายเดือนก่อน

    A lot of `effect` talk has gone over my head because of some of these tricky considerations. Even after using effects extensively, I have had assorted issue including circular stuff. And untracked made sense, but I kind of thought it was overkill. Despite that lack of understanding I sort of weighed in on that issue because I wanted a more explicit pattern because I think it is an easier to understand model. Alex's distinction gave some good context. But I think seeing this all explained with an example has helped. I will probably start using `explicitEffect` the next time I give effects a solid try again. Thanks for the video.

    • @ZoaibKhan
      @ZoaibKhan  5 หลายเดือนก่อน +1

      You're welcome, Micheal! I've avoided using effects for the most part till now. Weirdly, I was using toObservable here before as it seemed to be the easiest way to do what I wanted without getting into effects 😀
      I think more official guidance is needed for these very common use cases!

  • @balajibalamurugan8053
    @balajibalamurugan8053 5 หลายเดือนก่อน

    It would be better if we had a function in a signal called listen that can listen to the signal changes!. What do you think of this ?

    • @ZoaibKhan
      @ZoaibKhan  5 หลายเดือนก่อน

      Yeah, that's a good option, but judging from Alex's answer on that GitHub issue, they're not considering it at least for now.
      But maybe in the future

    • @balajibalamurugan8053
      @balajibalamurugan8053 5 หลายเดือนก่อน

      @@ZoaibKhan do you think it's doable. I think some other frameworks like solid js have these kinds of functions

    • @ZoaibKhan
      @ZoaibKhan  5 หลายเดือนก่อน

      Yes, of course. It depends on the Angular team and what they're thinking about it. For now, it seems there are no plans for it, so we'll have to go with community contributions :)

    • @JonatanPetersson
      @JonatanPetersson 3 หลายเดือนก่อน

      @@balajibalamurugan8053 For now you could use toObservable to listen to it in an rxjs manner