Open jackherizsmith opened 1 year ago
+1 In general complex Boolean expressions are especially hard for humans to read, and tend to be a common source of bugs, so anything you can do to simplify them, or simplify your control-flow in general is a win.
so this is just an opinion: I found this function in
/firebase/firestore.js
which uses unconventional Boolean logic to run some code or not, whereas typically you would see that pattern in JSX.It's this:
this is obviously working just fine so no need to change it - however, I think it's more readable / easier to understand with a more common pattern, i.e.
(or, if you like doing things in one line)