Skip to content

Commit 719d65f

Browse files
committed
Make function guidance independent of removed ES6 framing
1 parent 307d67c commit 719d65f

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-
In particular, you should prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. However, you *should* use arrow functions where they provide a tangible improvement (such as preserving `this` context inside a component). Consider both sides of the tradeoff when deciding whether to use a new feature.
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.
4444

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

0 commit comments

Comments
 (0)