3 ms·
> how silly it is that components cannot reuse logic It may be that your component is too complicated. Components should only have UI code. First move business
by petilon 6y ago
> how silly it is that components cannot reuse logic
It may be that your component is too complicated. Components should only have UI code. First move business logic out of the component, into your model layer, and make it reusable there. This step will eliminate most of the need to reuse logic in components. If you still have logic inside your component that you want to reuse consider restructuring your component into multiple simpler components.