By @samuel · 2021-10-11 21:08
By @usernotnull · 2021-10-12 05:38
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...
By @samuel · 2021-10-12 14:07
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.