WATCH NEXT: Beginner's RxJS Tutorial: Dive Deep with RxJS Crash Course - kzbin.info/www/bejne/r3vHmWSVe8enoLcsi=qhsqP7Eu3Nd7_hIU
@riketscience Жыл бұрын
you are THE MAN!!!!! I am really glad I stumbled upon your channel. Everything you say is concise and exactly matches my digestion speed. I am going to learn a lot. Huge thanks and praise 👏👏👏👏👏
@MonsterlessonsAcademy Жыл бұрын
Welcome aboard!
@AshishSharma-zc4lwАй бұрын
Up till now the best video on Subjects and BehavioralSubject I have watch so far. One good thing is that you explained by giving an example of services and why subjects should be used in place of it. Please keep up the good work.
@MonsterlessonsAcademyАй бұрын
Thanks
@ferran-ramirez Жыл бұрын
Nice video! The most important thing to get from it is that a BehaviorSubject holds one value regardless of when it was added (with next() or initializing ). When it is subscribed it emits the value immediately. A Subject doesn't hold a value, the value has to be set after something is subscribed to it.
@MonsterlessonsAcademy Жыл бұрын
Yes exactly
@sfspmusic Жыл бұрын
Дружище, у тебя талант нормально оъяснять + ты вкладываешь много труда в каждое видео, спасибо тебе огромное!
@advance51896 ай бұрын
Your tutorials are out of this world! Thanks
@MonsterlessonsAcademy6 ай бұрын
Glad you like them!
@vvmaas Жыл бұрын
Excellent content, the pace and eloquence of your speech makes it so much easier to absorb the ideas.
@MonsterlessonsAcademy Жыл бұрын
Glad you think so!
@ganesanvasu1835 Жыл бұрын
Thank you. Your way of explaining things were much better to understand..
@MonsterlessonsAcademy Жыл бұрын
Glad it was helpful!
@viniciusbernardo2112 Жыл бұрын
The best explanation that i heard so far about behaviorSubject/Subject. You just earned another subscriber (not the observable hahaha)
@MonsterlessonsAcademy Жыл бұрын
Welcome aboard!
@alexandersmotrikov9007 Жыл бұрын
Thanks, Alexander! Nice, short and clear.
@MonsterlessonsAcademy Жыл бұрын
Glad you enjoyed it!
@LukeAvedon Жыл бұрын
I was just pondering this! Glad you made another excellent video on the topic.
@MonsterlessonsAcademy Жыл бұрын
Glad to hear that!
@hugo-onzakorderra8851 Жыл бұрын
I love to use BehaviorSubject for all variables used in templates!
@MonsterlessonsAcademy Жыл бұрын
Yeap that's a flexible way
@hamza201183 Жыл бұрын
Hi Oleksandr! What do you think could be the consequences of Signals on NgRx? Many thanks!
@MonsterlessonsAcademy Жыл бұрын
I already replied such concerns. Hi hamza, That's a great question which I looked for myself as I want to update my Angular/NgRx course and make it with correct choices :) So Signals will be dominant together with standalone components (and full projects). In NgRx github core contributors wrote that they will use signals under the hood with no changes from ngrx state packages. Additionally they will make ngrx signals package similar to ngrx component store which will be limited to a single component.
@SrinathJog Жыл бұрын
Thanks for this clear understandable video. My question is , Can we use Behavior Subject instead of Subject everywhere ? I mean do we need to replace subject with Behavior Subject completely because Behavior Subject has initial value and we can have value of it anytime unlike subject. Or we have some unique scenarios that we have to use simply Subject in place of Behavior Subject ? What is the significance of both. Thanks in advance
@MonsterlessonsAcademy Жыл бұрын
If you don't want an initial emit than BehaviorSubject is not a good idea. Othen then that you can.
@john_yeager10 ай бұрын
yeah but with behavioral subject if i dont put initial value the 3 component i try to show the value break i think
@CodingAbroad Жыл бұрын
It makes you think why Subject exists in the first place. I’ve never found a need for it
@MonsterlessonsAcademy Жыл бұрын
If you don't want an initial trigger and you don't want to store data inside. Something like notification system fits well
@JBuchmann Жыл бұрын
I recently was using BehaviorSubject and it was causing a problem for me because on subscribe I'd get 2 values. The default first and then the one I needed after (from the "next" call). I thought I had a bug and tried unsuccessfully to do some workaround hacks. Then I realized all I really needed was to use a Subject instead. That was an "ah ha" moment that solidified my understanding of the difference between the two
@DD-vc7fq Жыл бұрын
@@JBuchmann I get it that using subject is the best solution here to skip the initial emit, but why didn't subject.pipe(skip(1)) cross your mind?
@JBuchmann Жыл бұрын
@@DD-vc7fq I did for a while resort to skip(1) and it worked for one part of my app. But somehow a different part of the app required the first emission. It was unreliable for my specific situation. For my situation, skip(1) was a bad bandaid and not what it's meant to be used for.
@MrJeszam Жыл бұрын
I agree. Subject or plain subject is stupid and useless.
@MonsterlessonsAcademy Жыл бұрын
The are some usecases for Subject like notifying that some action happens when you don't really need to store data inside.
@JBuchmann Жыл бұрын
@@MonsterlessonsAcademy perfect explanation. I always wonder which is the best one to use and my decision is based on if I need to emit a default value. But what you said here is just as important.