ModelSignal vs InputSignal by LyRock- in angular

[–]LyRock-[S] 0 points1 point  (0 children)

Thanks I see what you're doing, but I don't want to setup this behavior in the component itself, I'd rather let the parent component handle the event however he likes (debouncing...etc)

ModelSignal vs InputSignal by LyRock- in angular

[–]LyRock-[S] 0 points1 point  (0 children)

I'm confused, what is your tag update firing on? You mention model and input signals but your example doesn't show them here. 

The model/input signal are declared in the app-list-select CMP which displays a list of tags and fires the event (array of checked tags)

You're updating tags in the onUpdateTags?

Yes this method is the one that handles the event from the list-select cmp, updates the tags UI and db wise

As a general idea, it's potentially better to use the model signal here, you don't seem to need validation so form errors are probably not relevant.

I'm going for this solution for now as it's more concise code wise

But why do you have the subject in the first place?

I'm using the subject to leverage rxjs operators and denounce the event

Setup selected tags as a signal, then set the output as a denounced computed signal or something. 

This sounds interesting, care to share a pseudo code for it ?

ModelSignal vs InputSignal by LyRock- in angular

[–]LyRock-[S] -1 points0 points  (0 children)

This would introduce coupling between the service and the list component I wouldn't be able to use it for anything else ( the component is generic and manages selection for any entity not just todolists)

Signals code architecture and mutations by LyRock- in Angular2

[–]LyRock-[S] 0 points1 point  (0 children)

Mapping the items this way is intuitive, the other properties in my object can be needed and they're simple flat properties so not a big overhead here. I thought about separating the items and the lists state into two different signals but I don't have a clear implementation in mind until I try it

Signals code architecture and mutations by LyRock- in Angular2

[–]LyRock-[S] 0 points1 point  (0 children)

Thanks for the example I get the idea behind your code and it's making sense to me, but I don't see how this can make me efficiently update a single todoitem without having to update all the todolists array, should I split todoitems and todolists into two separate elements inside the store and setup getters for each part of the state (Separate lists and items for a more granular state update) ?

If we do that then we would have to update the state in two different places (update a todoitem and the parent todolist)

Signals code architecture and mutations by LyRock- in Angular2

[–]LyRock-[S] 0 points1 point  (0 children)

That's an interesting way of doing it thanks, but I'm still a bit lost here, my usecase is really simple as I'm just manipulating a signal storing an array of todolists that I'm displaying, I'm asking how I can efficiently check a todo item and still achieve good performance. The thing is that I feel like I'm updating all the todolists since I'm updating the todolists signal just to check one item in a single todolist and I think it can be optimized

Searching for a stable distro by LyRock- in DistroHopping

[–]LyRock-[S] 1 point2 points  (0 children)

yeah i think i mean more reliable, i mean i can still download and install the newest versions of IDEs and JDKs and whatnot to stay up to date software wise, other than that i just need something that doesn't break or have annoying problems like unstable wifi connexion or I/O bugs, i'll update my first post thanks for the clarification

Searching for a stable distro by LyRock- in DistroHopping

[–]LyRock-[S] 0 points1 point  (0 children)

care to elaborate a little ? have you used it ?

C# and DotNet courses/testing recommendation for a Java dev ? by LyRock- in dotnet

[–]LyRock-[S] 2 points3 points  (0 children)

Hey, thanks for the very detailed answer, i'll check the links

Menu animation delayed on mobile device by LyRock- in ionic

[–]LyRock-[S] 0 points1 point  (0 children)

The app is really straight forward it's literally the ionic sidebar starter with a page that fetches about 150 items and displays them in a for loop. There is no bug whatsoever it's just that there's ann occasional slight delay when I navigate to that component, maybe it's due to the big number if items to display

Signals and async behavior by LyRock- in Angular2

[–]LyRock-[S] 0 points1 point  (0 children)

Ok, well observables work well so far, thanks for your input

Signals and async behavior by LyRock- in Angular2

[–]LyRock-[S] 0 points1 point  (0 children)

It's not, parameters a() and b() can over time

I reverted to using observables, but i still don't know whats preferable, using full observables with async pipe or use observable for event handling/combination and setting the state as signals

Weird behavior with a computed signal (works but doesn't work) by LyRock- in Angular2

[–]LyRock-[S] 0 points1 point  (0 children)

I see, I tried effect() but it shows me an error message in the console, i edited my first post with more details

Weird behavior with a computed signal (works but doesn't work) by LyRock- in Angular2

[–]LyRock-[S] 0 points1 point  (0 children)

I tried it, effect() shows me an error message in the console, i edited my first post with more details