Skip to content

Commit c0038f9

Browse files
authored
Merge pull request #745 from petersendidit/self-closing-comp-docs
Update self-closing-comp doc to show example of a intentional space
2 parents 1b6cef9 + 0461e3c commit c0038f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/rules/self-closing-comp.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ The following patterns are not considered warnings:
1515
```js
1616
var contentContainer = <div className="content"></div>;
1717

18+
var intentionalSpace = <div>{' '}</div>;
19+
1820
var HelloJohn = <Hello name="John" />;
1921

2022
var Profile = <Hello name="John"><img src="picture.png" /></Hello>;
23+
24+
var HelloSpace = <Hello>{' '}</Hello>;
2125
```
2226

2327
## Rule Options

0 commit comments

Comments
 (0)