Skip to content

Commit ef7fbea

Browse files
committed
Add further reasoning for using double quotes in JSX
1 parent d4f69ef commit ef7fbea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

react/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
- Always use double quotes (`"`) for JSX attributes, but single quotes for all other JS.
120120

121121
> 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.
122+
> Regular HTML attributes also typically use double quotes instead of single, so JSX attributes mirror this convention.
122123
123124
```javascript
124125
// bad

0 commit comments

Comments
 (0)