We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a597da5 commit 28a04a3Copy full SHA for 28a04a3
README.md
@@ -912,7 +912,13 @@ Other Style Guides
912
const itemHeight = (item) => item.height > 256 ? item.largeSize : item.smallSize;
913
914
// good
915
- const itemHeight = (item) => { return item.height > 256 ? item.largeSize : item.smallSize; };
+ const itemHeight = item => (item.height > 256 ? item.largeSize : item.smallSize);
916
+
917
+ // good
918
+ const itemHeight = (item) => {
919
+ const { height, largeSize, smallSize } = item;
920
+ return height > 256 ? largeSize : smallSize;
921
+ };
922
```
923
924
**[⬆ back to top](#table-of-contents)**
0 commit comments