Комментарии:
As far as I can tell, you have no access to the previous signal value in `effect`, which means you can't perform operations that need to compare the old value with the new one. `ngOnChanges` allows you to do this. If that's the case, then this feels like an incomplete solution, though I'm sure it still fits for the vast majority of use cases.
ОтветитьHey, I'd like to have your opinion on this - Why do you think InputSignals don't have .update and .set properties?
In my use-case I have a bunch of shared components. For example - TableComponent receives list of entries, appends 'checked' and 'selected' props to them and then the table will handle the logic of selecting and checking those entries, although with these inputs it's not possible since they are read-only.
My work around right now is to use set functions like you have in the video.
Thank you for this informative video, I wanted to know if this is a stable change or in experimental phase?
ОтветитьSooooo nice
ОтветитьHere we go, 17.1 is out
ОтветитьFucking finally!
ОтветитьPerhaps my biggest gripe with Angular as someone who has an equivalent level of React experience is how clunky component composition and "prop" usage has been in Angular due to the non-reactive nature of the input decorator. This is one of the largest usability enhancements ever. Nice!
ОтветитьWe can pass observable as an input, like here:
<app-test [isMoreUsers$]="isMoreUsers$"</app-test>
@Input() isMoreUsers$: Observable<boolean>;
But his approach is often considered not good. What's the main issue with it?
Before 7.1, can this be simulated by doing something like this without the need for the set operator?
@Input({ required: true }) messages!: Signal<Message[]>;
Do i still need the @input()? (which i like.. Tells me how i can expect how it can be have)
ОтветитьWhat about the performance?? React is way better than these changes. I would prefer React over Angular.
Ответитьsmooth 😄
ОтветитьThat combined with router inputs and the rxjs interop, it does look good !
Ответитьlove this change!
ОтветитьI believe in passing an observable | async in the input. So every change will be reflected
ОтветитьBrilliant
ОтветитьWell, it is quite a stretch to call it imperative (signal input just reduces the boilerplate in comparison to the setter, but technically does the same thing), but there is a much more important difference: signal input gives you “the single source of truth” - no other code can write to that signal.
Ответитьhave u heard whether it will experimental or production?
ОтветитьAngular is getting easier and easier. I really liked it. Started Angular 2 years ago and seeing some headache goes makes me happy :D
ОтветитьVery happy this is finally landing! One question Josh or anyone here, what do you think about the ngrx/signals lib? I've been checking it out and it seems really powerful and fully declarative...
Ответитьhi when does the .ng is release did they mention that its going to be a game changer. like .vue file it should support html and css autocomplete!!
ОтветитьSoooo much cleaner!!
Ответить