@onsmith wrote:
How do you name your computed properties and actions?
For example, suppose you have a
settings-manage-panel
component that should only be shown if the user is an administrator. You therefore make a boolean computed property that istrue
if the user is an administrator, orfalse
if the user is not. Do you name the propertyuserIsAdmin
or do you name itshowManagementPanel
? Basically I'm asking should the computed property be named after what it is or what it's used for?Similarly, suppose you have a form with a submit button that creates a new
post
resource. Do you name the actionpostFormSubmitted
orcreatePost
? Worded differently, should actions be named after what caused them or what they should do once triggered?
Posts: 1
Participants: 1