diff --git a/react/README.md b/react/README.md index ee9e32ca..5ea9b524 100644 --- a/react/README.md +++ b/react/README.md @@ -47,7 +47,7 @@ } ``` - And if you don't have state or refs, prefer functions over classes: + And if you don't have state or refs, prefer normal functions (not arrow functions) over classes: ```javascript @@ -58,6 +58,11 @@ } } + // bad (since arrow functions do not have a "name" property) + const Listing = ({ hello }) => ( +
{hello}
+ ); + // good function Listing({ hello }) { return
{hello}
;