clarify SRP definition (#8008)

* clarify SRP definition

* Update src/content/learn/thinking-in-react.md

---------

Co-authored-by: Ricky <rickhanlonii@gmail.com>
This commit is contained in:
0xPxt
2025-10-16 23:28:10 +02:00
committed by GitHub
parent 896a689aa1
commit fe87df57f8

View File

@@ -37,7 +37,7 @@ Start by drawing boxes around every component and subcomponent in the mockup and
Depending on your background, you can think about splitting up a design into components in different ways:
* **Programming**--use the same techniques for deciding if you should create a new function or object. One such technique is the [single responsibility principle](https://en.wikipedia.org/wiki/Single_responsibility_principle), that is, a component should ideally only do one thing. If it ends up growing, it should be decomposed into smaller subcomponents.
* **Programming**--use the same techniques for deciding if you should create a new function or object. One such technique is the [separation of concerns](https://en.wikipedia.org/wiki/Separation_of_concerns), that is, a component should ideally only be concerned with one thing. If it ends up growing, it should be decomposed into smaller subcomponents.
* **CSS**--consider what you would make class selectors for. (However, components are a bit less granular.)
* **Design**--consider how you would organize the design's layers.