mirror of
https://github.com/facebook/react-native.git
synced 2024-11-22 06:29:46 +00:00
JSX style
Wrote some notes on the standard JSX / XHP style
This commit is contained in:
parent
4ce03582a0
commit
c031ccdc57
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user