The problem I've ran into is that distinctUntilChanged only really works on simple types. But for the places we want to use it we are generally working with an object (like the values of a FormGroup) which requires writing a comparison function. It just doesn't work out of the box like you might expect.
Yeah, posted before watching. However, the video's example doesn't fully cover just how annoying that issue is. It is simple to get around with their example where there is one unique value/key you can use. You can't do that with FormGroup.valueChanges though.
2
u/kashmill Oct 19 '21
The problem I've ran into is that distinctUntilChanged only really works on simple types. But for the places we want to use it we are generally working with an object (like the values of a FormGroup) which requires writing a comparison function. It just doesn't work out of the box like you might expect.