From 28a04a3a45d169bbb6fa8cc9a3ff94e98a6a6a2a Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 21 Jun 2016 22:41:03 -0700 Subject: [PATCH] =?UTF-8?q?[docs]=20Clear=20up=20=E2=80=9Cconfusing=20arro?= =?UTF-8?q?ws=E2=80=9D=20example.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #856. --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)**