Hey man , from last few days i was not getting time to watch angular videos, but now i will continue your angular series. Please continue the series and it will be good if you will try to cover ngrx too, thanx again
Great! You said that it’s better not to mutate data from our service. And with Behavior Subject we did it private on service, created additional public observable from this BehaviorSubject and subscribe or listen to changes from it - so our original BehaviorSubject was isolated from outside. But, with signals, as I can see, we don’t make it private, so we can mutate its original value from outside, right? - but that’s not good. How to deal with it then?
Excellent question mate! There are a couple of ways to achieve it. You could, for instance, make the signal private in the service, and then setup getters and setters to fetch and change the signal value. Then you would be able to control that. I have not tested that yet - but theoretically - it should work :) However, in my opinion, it's quite annoying to have to set that up for each and every signal. Therefore, I would attempt to standardize the way of working with it - you could then potentially set that logic up in the Perform class that I demonstrate in the video. See the code sample below: For instance. private _signal = signal(3); get signal() { return _signal(); } set signal(value: number) { _signal.set(value) }
At this stage, investing time in a fading platform seems less productive. Instead, considering the addition of new concepts, it might be worthwhile to explore React or Vue, aligning with what the current trendsetting developers are pursuing.
Angular is the #1 framework for enterprise apps (I have experience with all of them in different sizes). Signals will introduce less boilerplate code and improved performance. End of the day, picking a framework/library will differ based on organisational needs. :)
Hey man , from last few days i was not getting time to watch angular videos, but now i will continue your angular series. Please continue the series and it will be good if you will try to cover ngrx too, thanx again
Thanks for the feedback mate! Will do that for sure! 🙏🙏
new format for angular 16 ? i aprove this good job Continue seb =)
Yes and thank you bro! 🙏🙏
Looking forward to angular 16
Same 👀🤘
Great! You said that it’s better not to mutate data from our service. And with Behavior Subject we did it private on service, created additional public observable from this BehaviorSubject and subscribe or listen to changes from it - so our original BehaviorSubject was isolated from outside. But, with signals, as I can see, we don’t make it private, so we can mutate its original value from outside, right? - but that’s not good. How to deal with it then?
Excellent question mate! There are a couple of ways to achieve it. You could, for instance, make the signal private in the service, and then setup getters and setters to fetch and change the signal value. Then you would be able to control that. I have not tested that yet - but theoretically - it should work :) However, in my opinion, it's quite annoying to have to set that up for each and every signal. Therefore, I would attempt to standardize the way of working with it - you could then potentially set that logic up in the Perform class that I demonstrate in the video.
See the code sample below:
For instance.
private _signal = signal(3);
get signal() {
return _signal();
}
set signal(value: number) {
_signal.set(value)
}
Superb Mr😎
Thanks bro 🙏🙏
signal it's nice feature, but when you use signal, you call functions in template and this is not good idea
That's not entierly correct mate. It would be the same thing as having a variable in those cases. :)
🎉🎉 thanks 👍
Thank you mate 🙏🙏
@@DevBySeb You are awesome bro!
@@nouchance thank you bro! Much appreciated!
At this stage, investing time in a fading platform seems less productive. Instead, considering the addition of new concepts, it might be worthwhile to explore React or Vue, aligning with what the current trendsetting developers are pursuing.
Angular is the #1 framework for enterprise apps (I have experience with all of them in different sizes). Signals will introduce less boilerplate code and improved performance.
End of the day, picking a framework/library will differ based on organisational needs. :)