StackOverflow - javascript, reactjs, ecmascript-6, eslint, airbnb-js-styleguide

Why does the Airbnb style guide say that relying on function name inference is discouraged?

// bad class Listing extends React.Component { render() { return
{this.props.hello}
; } } // bad (relying on function name inference is discouraged) const Listing = ({ hello }) => (
{hello}
); // good function Listing({ hello }) { return
{hello}
; } This is taken from the Airbnb react style guide. Can someone please explain why "relying on function name inference is discouraged"? Is it just a style concern?

Was this helpful?

Have a different question?

Can't find the answer you're looking for? Submit your own question to our community.

🛎️ Get Weekly OTA Fixes

New answers, vendor issues, and updates — straight to your inbox.