JSX style

Wrote some notes on the standard JSX / XHP style
This commit is contained in:
James Ide 2015-12-07 23:23:26 -08:00
parent 4ce03582a0
commit c031ccdc57
1 changed files with 8 additions and 0 deletions

View File

@ -67,6 +67,14 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
* Do not use the optional parameters of `setTimeout` and `setInterval`
* 80 character line length
#### JSX
* Prefer `'` over `"` for string literal props
* When wrapping opening tags over multiple lines, place one prop per line
* `{}` of props should hug their values (no spaces)
* Place the closing `>` of opening tags on the same line as the last prop
* Place the closing `/>` of self-closing tags on their own line and left-align them wih the opening `<`
#### Objective-C
* Space after `@property` declarations