Browse Source

Change bold text to headings to add id for links

main
Alex 7 years ago
committed by GitHub
parent
commit
a4cfe30a4a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      CONTRIBUTING.md

8
CONTRIBUTING.md

@ -34,21 +34,21 @@ When writing step-by-step instructions (e.g. how to install something), try to f
### Syntax
**Prefer JSX to `createElement`.**
#### Prefer JSX to `createElement`.
Ignore this if you're specifically describing `createElement`.
**Use `const` where possible, otherwise `let`. Don't use `var`.**
#### Use `const` where possible, otherwise `let`. Don't use `var`.
Ignore this if you're specifically writing about ES5.
**Don't use ES6 features when equivalent ES5 features have no downsides.**
#### Don't use ES6 features when equivalent ES5 features have no downsides.
Remember that ES6 is still new to a lot of people. While we use it in many places (`const` / `let`, classes, arrow functions), if the equivalent ES5 code is just as straightforward and readable, consider using it.
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.
**Don't use features that aren't standardized yet.**
#### Don't use features that aren't standardized yet.
For example, **don't** write this:

Loading…
Cancel
Save