Design Patterns · Junior · Question 26 of 75

What does the Single Responsibility Principle (SRP) require?

Explanation

A component that loads data, formats it and draws a table changes for different reasons. Splitting it into a loading hook, formatting functions and a presentational component simplifies changes and tests. "One function" is a misreading.

Further reading

Problem with a question

Design Patterns · Junior · question 26

Test yourself

Take the Design Patterns · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz