Commit 030de09
Eduardo Pelitti
Modify duplicate code block in intro-react.md (facebook#2051)
There are two examples placed one on top of the other where the code is exactly the same.
This makes the docs harder to understand, as referencing the same exact code for pointing out two different things in consecutive paragraphs can be confusing to a newcomer. It feels like a mistake, even though it can be backed that it is not.
I suggest removing the `export default Cat;` from the first example, where introducing the concept of default exports is not necessary, and use it only on the second code block, where the complete function component is displayed and once the concept has been properly introduced in the previous paragraph.
I think this makes more sense and avoids the duplicate.1 parent 1e5e52f commit 030de09
1 file changed
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| |||
0 commit comments