Closed pelotom closed 5 years ago
Imho you sometimes use div
containers for styling purposes, e.g. when working with flexbox.
<div style={{ display: "flexbox", justifyContent: "space-between", height: "200px" }}>
<div>foo</div>
<div>bar</div>
</div>
How would you prevent using <div>
in this example and what are other common use cases of useless <div>
s?
@cheeZery this is certainly true, but IME pretty rare, and I’m happy to provide lint-disabling pragmas for the few cases where I need this.
Closing due to deprecation timeline, see #210
<div>
s without attributes and containing only a single child are usually useless and can be eliminated.