Before: The CoursesComponent handled both displaying courses and filtering by program.
After: We separated the filtering logic into the ProgramFilterComponent, while the CoursesListComponent is responsible for displaying the list. Now, each component has a single responsibility.
This way, if we need to update the filtering logic or the course list display in the future, we can modify them independently, adhering to the Single Responsibility Principle.
Before: The CoursesComponent handled both displaying courses and filtering by program.
After: We separated the filtering logic into the ProgramFilterComponent, while the CoursesListComponent is responsible for displaying the list. Now, each component has a single responsibility.
This way, if we need to update the filtering logic or the course list display in the future, we can modify them independently, adhering to the Single Responsibility Principle.