Skip to content

Commit c598a5a

Browse files
committed
Clarify readability guidance and arrow function use cases
1 parent 719d65f commit c598a5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Ignore this if you're specifically writing about ES5.
4040

4141
#### Prefer readable syntax.
4242

43-
Prefer named `function` declarations over `const myFunction = () => ...` arrow functions for top-level functions. Use arrow functions when they make the code clearer or preserve the surrounding `this` value, such as in class components.
43+
Choose syntax that makes each example easier to follow. Prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. Use arrow functions when they make callbacks easier to read. In class components, arrow functions can also preserve the component's `this` value.
4444

4545
#### Don't use features that aren't standardized yet.
4646

0 commit comments

Comments
 (0)