replace arrow functions consisting of a single `return` statement with an expression
const f = () => {
return (
<expr>
)
}
VS.
const f = () => (
<expr>
)
Advantages
- 1 less level of indentation
- 2 fewer lines
Disadvantages
- Requires refactoring if we need to add additional statements (e.g. for defining
const
values that are used several times