3 ms·
Two things there... 1. If PHP coders did component driven development it might not be so bad, the problem is most PHP apps mix code and HTML in a way that rese
by throwaway2016a 10y ago
Two things there...
1. If PHP coders did component driven development it might not be so bad, the problem is most PHP apps mix code and HTML in a way that resembles speggeti so we (I've tought a lot of PHP courses) teach separation of concerns as to encourage maintainable code.
2. In React you're not really supposed to (as a matter of best practice) mix presentation and business logic. Typically most components are for presentation only with business logic done via event handlers and props. If you need state you should wrap your display component in a business logic component (typically called a container in the Redux world).