prefer-shorthand-fragment
Rule category
Style.
What it does
Enforces the use of shorthand syntax for fragments.
Examples
Failing
import React, { Fragment } from "react";
function Example() {
return (
<Fragment>
<button />
<button />
</Fragment>
);
}
Passing
import React from "react";
function Example() {
return (
<>
<button />
<button />
</>
);
}