reactjs / react.dev

The React documentation website
https://react.dev/
Creative Commons Attribution 4.0 International
11.07k stars 7.55k forks source link

[Typo]: Missing Blank Line Between Import Statements and Code Block in Sample Code #7125

Closed dev-satoshi closed 1 month ago

dev-satoshi commented 2 months ago

Summary

In this section of the page, two of the sample codes are missing a blank line between the block of import statements and the following code block. This inconsistency affects readability and contrasts with other examples where a blank line is included.

Page

https://react.dev/learn/updating-objects-in-state#treat-state-as-read-only

Details

Most sample codes in the React documentation include a blank line between the import statements and the following code block. However, in this section, the two sample codes do not include this blank line. To maintain consistency and improve readability, it would be beneficial to add the missing blank lines. This practice is commonly recommended in many style guides and projects to enhance code clarity and maintainability.