Skip to content

Commit 307d67c

Browse files
committed
Preserve original arrow function guidance
1 parent 4b5d55f commit 307d67c

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 for components and top-level functions. Use arrow functions for inline callbacks when they make the example easier to follow.
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.
4444

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

0 commit comments

Comments
 (0)