Are you using Angular Signal Effects in the RIGHT way?

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 10

  • @RainerHahnekamp
    @RainerHahnekamp Месяц назад +1

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

    • @ZoaibKhan
      @ZoaibKhan  Месяц назад +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 :)

  • @MichaelSmallDev
    @MichaelSmallDev Месяц назад

    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  Месяц назад +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 Месяц назад

    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  Месяц назад

      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 Месяц назад

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

    • @ZoaibKhan
      @ZoaibKhan  Месяц назад

      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