mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
Add reasoning for using double quotes in JSX
This commit is contained in:
committed by
Kevin Cooper
parent
f823047e46
commit
d4f69efeec
@@ -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' />
|
||||
|
||||
Reference in New Issue
Block a user