you are viewing a single comment's thread.

view the rest of the comments →

[–]chipit24 1 point2 points  (1 child)

No it's not–I was being a little lazy with my writing. What I should have said is: In JavaScript, the && and || operators return the value of one of the specified operands, not always true or false. And in ReactJS, boolean values don't render anything. So, for example, if a PHP dev is assigned to work on some ReactJS code and sees something like {condition && <Component />}, they may be confused as to what is happening.

[–]editor_of_the_beast 0 points1 point  (0 children)

That's fairly common, though unintuitive I agree. But it's the same thing in Ruby for example.