---
title: "Comment by Arthur Corenzan on \"React Clean Code for Beginners\" | Hashnode"
description: "Hi Luiza, those are some great tips, thank you for this post! Just one thing though. I would advise against the use of boolean &amp;&amp; over the ternary opera"
url: "https://hashnode.com/posts/react-clean-code-for-beginners/604eaf5937d84907f1329731/comment/60509854825b051f2b9dd335"
---

[Discussion](https://hashnode.com/posts/react-clean-code-for-beginners/604eaf5937d84907f1329731)

Comment [React Clean Code for Beginners](https://hashnode.com/posts/react-clean-code-for-beginners/604eaf5937d84907f1329731)

[Arthur Corenzan](https://hashnode.com/@haggen)

[Mar 16, 2021](https://hashnode.com/posts/react-clean-code-for-beginners/604eaf5937d84907f1329731/comment/60509854825b051f2b9dd335)

Hi Luiza, those are some great tips, thank you for this post!

Just one thing though. I would advise against the use of boolean `&&` over the ternary operator. Here's a cautionary tale: [kentcdodds.com/blog/use-ternaries-rather-than-and…](https://kentcdodds.com/blog/use-ternaries-rather-than-and-and-in-jsx/)

TL;DR is that the operator `&&` _might_ evaluate to the first value whereas the ternary will only evaluate to the explicit expressions you type in second and third positions. While the code is new and short it's clear to see, but once enough time has past and enough keyboards have touched it things get messier and bugs like these creep in.

Have a great day! ☺️

[Luísa Ribeiro Bezerra](https://hashnode.com/@luisarbezerra)

[Mar 16, 2021](https://hashnode.com/posts/react-clean-code-for-beginners/604eaf5937d84907f1329731/comment/60509854825b051f2b9dd335#reply-6050b012825b051f2b9dd603)

Oh lord! I'll add this info in the text :) thank you very much!
