They would simplify the code.
Context: in the early versions of htmy, function components weren't flexible or performant enough, but they have been fully reimplemented since then, and they also support more use-cases now (for example methods can also be components now). Implementing the htmy() method on a class is primarily recommended for enhancing existing business objects with rendering capabilities (although @component.method and @component.context_only_method is a good alternative for this as well).
They would simplify the code.
Context: in the early versions of
htmy, function components weren't flexible or performant enough, but they have been fully reimplemented since then, and they also support more use-cases now (for example methods can also be components now). Implementing thehtmy()method on a class is primarily recommended for enhancing existing business objects with rendering capabilities (although@component.methodand@component.context_only_methodis a good alternative for this as well).