mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
[guide] [react] boolean in jsx alignment
This commit is contained in:
committed by
Jordan Harband
parent
b6a268f780
commit
a12dec90d1
@@ -193,6 +193,25 @@ This style guide is mostly based on the standards that are currently prevalent i
|
||||
>
|
||||
<Quux />
|
||||
</Foo>
|
||||
|
||||
// bad
|
||||
{showButton &&
|
||||
<Button />
|
||||
}
|
||||
|
||||
// bad
|
||||
{
|
||||
showButton &&
|
||||
<Button />
|
||||
}
|
||||
|
||||
// good
|
||||
{showButton && (
|
||||
<Button />
|
||||
)}
|
||||
|
||||
// good
|
||||
{showButton && <Button />}
|
||||
```
|
||||
|
||||
## Quotes
|
||||
|
||||
Reference in New Issue
Block a user