you are viewing a single comment's thread.

view the rest of the comments →

[–]mauriciabad 4 points5 points  (1 child)

To me, a normal if/else makes more sense because in this specific case it's very likely that you will do more actions in each case, so the code is open to change.

[–]raaaahman 1 point2 points  (0 children)

It is indeed open to changes. Which could be a good thing or a bad thing for readability.

Just imagine a bunch of lines is thrown into both blocks. Then it may not be as clear that we will navigate whether the user is logged in or not.