Add reasoning for using double quotes in JSX

This commit is contained in:
Kevin Cooper
2015-10-01 14:56:39 -07:00
committed by Kevin Cooper
parent f823047e46
commit d4f69efeec

View File

@@ -117,6 +117,9 @@
## Quotes
- Always use double quotes (`"`) for JSX attributes, but single quotes for all other JS.
> Why? JSX attributes [can't contain escaped quotes](http://eslint.org/docs/rules/jsx-quotes), so double quotes make conjunctions like `"don't"` easier to type.
```javascript
// bad
<Foo bar='bar' />