You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a reused form component for both the record creation and the record modification, is it acceptable to use ternary operators instead of if/else like this?
It's a clear-cut case. With code-formatting of new-line and indent, it's quite readable. And in the foreseeable future, for each condition of the formAction, the business logic is unlikely to be changed.
The text was updated successfully, but these errors were encountered:
In a reused form component for both the record creation and the record modification, is it acceptable to use ternary operators instead of if/else like this?
It's a clear-cut case. With code-formatting of new-line and indent, it's quite readable. And in the foreseeable future, for each condition of the
formAction
, the business logic is unlikely to be changed.The text was updated successfully, but these errors were encountered: