By @samuel · 5 days ago
Manual memoization as opposed to using Livewire's computed properties magic to add type-hinting. If only it was possible to type-hint magic methods...
Right, I'll edit the article to mention that computed properties can be used as well. Seems like the approach I suggested has some issues anyway (I used a simplified example of the code I generally use).
I generally avoid computed properties for things like these because I don't like adding
@property-read annotations when I can implement things using a method instead.