diff --git a/README.md b/README.md index 026175b6..1c59869e 100644 --- a/README.md +++ b/README.md @@ -912,7 +912,13 @@ Other Style Guides const itemHeight = (item) => item.height > 256 ? item.largeSize : item.smallSize; // good - const itemHeight = (item) => { return item.height > 256 ? item.largeSize : item.smallSize; }; + const itemHeight = item => (item.height > 256 ? item.largeSize : item.smallSize); + + // good + const itemHeight = (item) => { + const { height, largeSize, smallSize } = item; + return height > 256 ? largeSize : smallSize; + }; ``` **[⬆ back to top](#table-of-contents)**