Skip to content

Commit 39f30d4

Browse files
EmmaBsophiebits
authored andcommitted
Update thinking-in-react.md (#2098)
Follow up to reactjs/react.dev#2095 (comment)
1 parent 92ad9c2 commit 39f30d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/thinking-in-react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The first thing you'll want to do is to draw boxes around every component (and s
3737

3838
But how do you know what should be its own component? 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.
3939

40-
Since you're often displaying a JSON data model to a user, you'll find that if your model was built correctly, your UI (and therefore your component structure) will map nicely. That's because UI and data models tend to adhere to the same *information architecture*, which means the work of separating your UI into components is often trivial. Break it up into components that represent exactly one piece of your data model.
40+
Since you're often displaying a JSON data model to a user, you'll find that if your model was built correctly, your UI (and therefore your component structure) will map nicely. That's because UI and data models tend to adhere to the same *information architecture*. Separate your UI into components, where each component matches one piece of your data model.
4141

4242
![Component diagram](../images/blog/thinking-in-react-components.png)
4343

0 commit comments

Comments
 (0)