DEV Community

Discussion on: 4 Ways to Render JSX Conditionally in React

Collapse
 
rasaf_ibrahim profile image
Rasaf Ibrahim

Thank you for writing about Guard Clause in details. I didn't know about this. I have modified the article and added this example under Logical Operator section as Guard Clause has ! (NOT Logical Operator).

Collapse
 
danwalsh profile image
Dan Walsh

Cheers, mate. But just to be clear, a guard clause doesnโ€™t specifically use a NOT operator. It can be any sort of expression that, when evaluated to be false (or falsy, depending on your logic), returns the function early.

Thread Thread
 
rasaf_ibrahim profile image
Rasaf Ibrahim

Very useful information, thank you. ๐Ÿ˜ƒ