For complex views, I have started creating DTO to hold all the view data, and the passing the dto into the view. This allows for some functionality inside the dto. For instance, I can pass the user's timezone into the dto when it is constructed so that every timestamp it returns has the timezone applied.
Using Str inside the view is fine, as others have said, but move complex logic elsewhere.
If you’re constantly applying to the same transformation to a particular piece of data (e.g. a model attribute), then it may be better to add an accessor to the model instead. But given you don’t tell us anything about the problem you’re actually trying to solve here, it’s impossible to say whether this solution is “right” or not.