Hey all, I’m hoping to attach simple convenience methods to the current user object to keep the code cleaner. For example, methods like getAvatar = () => this.avatarUrl || this.DEFAULT_AVATAR or isSetupNeeded = () => /*infer from several other existing properties*/
Is there a way to do this cleanly with type safety in RedwoodJS?
If there isn’t one, in your opinion is this not the right way to approach Node, React, Redwood type of projects?
Thanks for taking the time to answer! Is RedwoodRecord still being actively developed? I wasn’t able to find many references to it other than the docs page saying it’s experimental so I was hesitant to make the leap.
You’re right, I’m definitely struggling a bit with wanting to have methods attached to data models. It currently feels more natural to me and seems to be a good OOP value-add to the functional approach, especially for methods that respect the host object’s immutability. I probably just need to spend more time to build a different set of mental habits though