Тёмный
No video :(

Learn Angular Signals - The Future of State Management 

Monsterlessons Academy
Подписаться 45 тыс.
Просмотров 23 тыс.
50% 1

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 63   
@gowthamp5612
@gowthamp5612 Год назад
For me,signal just looks like useState and useEffect in React,with more functionalities like mutable and compute.But,in my opinion change detection will easier and quicker by signals.
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
I agree. Looks like copy pasting ideas from React
@andres3665
@andres3665 10 месяцев назад
They are copying and pasting from solid.js@@MonsterlessonsAcademy
@1306dk
@1306dk Год назад
I always look forward to your content. Any plans on getting in testing in Angular with Jest for example?
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
Thank you for the idea. I will add it to the list of future videos.
@Brendan2Alexander
@Brendan2Alexander Год назад
Helpful and concise thank u!
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
Glad it was helpful!
@jsiahaan
@jsiahaan Год назад
Great video! Thanks
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
You're welcome!
@d1ge
@d1ge 5 месяцев назад
Signals are not just easier to grasp, than RXJS, but they are also closer to what's actually happening under the hood. - the fact alone, that your effect methods now can run sync instead of async, without frankensteining your ngOnChange method, is a feature in itself
@MonsterlessonsAcademy
@MonsterlessonsAcademy 5 месяцев назад
Yeap
@tarquin161234
@tarquin161234 3 месяца назад
At the moment I just don't really like the idea of making async things sync just by using toSignal with an arbitrary initial value. Sometimes, effects don't work as desired/expected when this arbitrary value comes in as the first value before the database value. For example, my effect needed to calculate a default value for a form field when it was null, so I did it in an effect, but the problem was this arbitrary value came in before the db value and so the wrong value was assigned to the form field. In my opinion, it is better to just wait for the database value, which means using rxjs instead of a signal. In my opinion it is better to use rxjs for async stuff, and use signals for sync stuff if you want, but for me I find it simpler to just use rxjs for everything.
@waelm.elsaid295
@waelm.elsaid295 7 месяцев назад
Thank you very much for your valuable content , but i need to ask a question regarding the computed and specially for the example you used what the different between calling usersTotal() in the html template and calling users().length directly ? is there any advantage of using computed in this case ? and thanks again
@MonsterlessonsAcademy
@MonsterlessonsAcademy 7 месяцев назад
In this case not really. computed is some logic that you want to compute. Reading length has no logic so you don't need computed. It is also a good place for logic which you don't want to write in html.
@farrukhmomin5291
@farrukhmomin5291 Год назад
I really don't like the esthetics of signals. Code separation which ngrx offers make code base really clean. I hope angular team comes up with something which makes code looks cleaner.
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
You can continue use ngrx and they will use signals underneath.
@bullettime2808
@bullettime2808 7 месяцев назад
you are comparing apples with oranges
@xxRAP13Rxx
@xxRAP13Rxx Месяц назад
Thank you! Amazing video! What is the difference between update() and mutate()? Does update() trigger change detection in the current component while mutate() does not?
@xxRAP13Rxx
@xxRAP13Rxx Месяц назад
Actually, I can't seem to find mutate() in the Angular docs anywhere. I can only find update(). Did they remove mutate()?
@MonsterlessonsAcademy
@MonsterlessonsAcademy Месяц назад
You are right. They removed mutate (which is awesome)
@SteDeus
@SteDeus Год назад
The video was very clear! I just didn't understand how effect works: how does it know to trigger when title is changed and not when users does? Does it trigger every time any signal change?
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
As for now effect is called if any signal changes. I would like to see some api to trigger it only for specific signal similar to dependencies of useEffect in react
@luczztem
@luczztem Год назад
@@MonsterlessonsAcademy wow that's very weird...
@SteDeus
@SteDeus Год назад
@@MonsterlessonsAcademy Oh I see, I hope they give us a way to specify which effect should trigger or we have to make some custom shenanigans 😅
@baluditor
@baluditor Год назад
Effects will only run if any of their dependencies change, from the docs: Effects always run at least once. When an effect runs, it tracks any signal value reads. Whenever any of these signal values change, the effect runs again. Similar to computed signals, effects keep track of their dependencies dynamically, and only track signals which were read in the most recent execution.
@ajinkyachanshetty
@ajinkyachanshetty 5 месяцев назад
Amazing content!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 5 месяцев назад
Glad you think so!
@nandhakumarappusamy9457
@nandhakumarappusamy9457 4 месяца назад
Very helpful
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 месяца назад
Glad you think so!
@ismailuwair187
@ismailuwair187 5 месяцев назад
is it better in general to use signals instead of variables that are binded to UI for example?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 5 месяцев назад
Yes it is better.
@mugatu2017
@mugatu2017 Год назад
Excellent explanation
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
Glad you like it!
@mugatu2017
@mugatu2017 Год назад
@@MonsterlessonsAcademy we have in rxjs multicast operators (BehaviorSubject - ReplySubject - AsyncSubject, EventEmitter) son we can achieve exactly the saqme as Signals
@fastestnotes1046
@fastestnotes1046 7 месяцев назад
I don't get it. Why can't we just use the ngModel directive with events? It doesn't make sense to use a variable like title as a method call.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 7 месяцев назад
ngModel works through change detection cycle and signals not. Change detection cycle is slow on big apps and signals not.
@MultiWarrr
@MultiWarrr Год назад
Sorry for out of context question, in ngrx can and should i update state from the backend service without any actions dispatched from from user (commercial platform) Thanks in advance
@mahdikamran8061
@mahdikamran8061 9 месяцев назад
Hello, Thanks for your videos. I have a question, are you from Germany? where are you from?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 9 месяцев назад
Hi, originaly from Ukraine but last 8 years living in Hamburg.
@L-Lesiv
@L-Lesiv 7 месяцев назад
So signals need only for not enter in life cycles, they are not accesible from other components like subjects?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 7 месяцев назад
You can put them in service and reuse everywhere
@L-Lesiv
@L-Lesiv 7 месяцев назад
Why do we need [value]="title()" in html if we change signal in event function?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 7 месяцев назад
Because we need to render a value in the input
@LukeAvedon
@LukeAvedon Год назад
Wow. Hey, really likeing your paid course my guy.
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
Glad to hear that!
@yaghuzt
@yaghuzt 11 месяцев назад
Hi, I am a bit confused, to me it looks like ngModel, whats the difference?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 11 месяцев назад
It doesn't trigger Angular change detection cycle. It is extremely fast in big apps
@paweliszewski6575
@paweliszewski6575 Год назад
hello, what text editor are you using? love the channel
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
It's Vim here is my video about it ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-YrLiugDhCuk.html
@thorstenschmidt21
@thorstenschmidt21 Год назад
Hi, exists something like a benchmark? I learned that we should not call functions in Angular because it will make the app significantly slower. But with the signal you added a function to the view. How fast is it compared to older approaches?
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
I didn't see any benchmarks or real app comparisons yet.
@baluditor
@baluditor Год назад
Calling signals is not like calling a function, it's perfectly safe to do. Calling a function is discouraged due to Angular's change detection mechanism, but signals won't trigger change detection like functions would in the template.
@thorstenschmidt21
@thorstenschmidt21 Год назад
@@baluditor thank you, I had a chance to look into angular 16 now too and I think you are right.
@riatec6741
@riatec6741 Год назад
Can we cancel a signal that has been created?
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
Why do you need to do that? It is not a subscription. It's the same like creating a subject. I doesn't cause performance problems.
@nobrainer616
@nobrainer616 4 месяца назад
@@MonsterlessonsAcademywhy not just use the BehaviorSubject instead of signal? is there some other cases of signal usage that I’m missing?
@anutaNYC
@anutaNYC 6 месяцев назад
Target with a g as in girl not j
@chrisburd9751
@chrisburd9751 8 месяцев назад
I still think Rxjs is better than signals.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 8 месяцев назад
They are different
@chrisburd9751
@chrisburd9751 8 месяцев назад
@@MonsterlessonsAcademy I disagree - they both do state management, they both can interconnect components, and they both stream data the same way. In fact they are really no different than a behavior subject.
@pietrosmusi1409
@pietrosmusi1409 Год назад
they are copying from react and vue lol
@MonsterlessonsAcademy
@MonsterlessonsAcademy Год назад
Yeap a bit
@maciej12345678
@maciej12345678 8 месяцев назад
@effectssss
Далее
NgRx Signal Store - Is It a NgRx Replacement?
20:17
Просмотров 10 тыс.
VSCode is Not Enough Anymore in 2024
3:21
Просмотров 17 тыс.
Angular 17 Features With Examples - You Must Know That
14:44
Why Angular Signals? Write Your First Signal
14:25
Просмотров 10 тыс.
Angular Signals Example - Learn Them by Doing
50:50
Просмотров 12 тыс.
Getting started with Angular Signals
11:03
Просмотров 42 тыс.
NgRx For Beginners | Step by Step Tutorial | Angular
21:22
Angular 18 is EXACTLY what we needed
9:15
Просмотров 74 тыс.