In this case, isn't it better to use a setter for each @Input instead of listen to ngOnChanges?
I think that comes down to personal preference. Personally, I find Input getters and setters to be too verbose. I like all inputs handled in the same place.
I find Input getters and setters to be too verbose
checkout subjectize, which wraps the setter under the hood and you don't need a private variable.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In this case, isn't it better to use a setter for each @Input instead of listen to ngOnChanges?
I think that comes down to personal preference. Personally, I find Input getters and setters to be too verbose. I like all inputs handled in the same place.
checkout subjectize, which wraps the setter under the hood and you don't need a private variable.