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
If I have a UserInfo component with UserInfoActions and UserInfoReducer.
The server returns user data such as
{
fName: "first",
lName: "last",
}
In which file do I put helper methods?
Example: getFormattedName() which returns Fname Lname in titlecase?
Should I put the method directly in the Component file or should I create a separate UserInfoHelper file for such methods?
Also, if getFormattedName() is to be shared among multiple components, where should it go?
The text was updated successfully, but these errors were encountered:
If I have a
UserInfo
component withUserInfoActions
andUserInfoReducer
.The server returns user data such as
In which file do I put helper methods?
Example:
getFormattedName()
which returnsFname Lname
in titlecase?Should I put the method directly in the Component file or should I create a separate
UserInfoHelper
file for such methods?Also, if
getFormattedName()
is to be shared among multiple components, where should it go?The text was updated successfully, but these errors were encountered: