Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Ranchonyx1055433dNot a react developer, but I also like having my types separate from my logic.
It feels cleaner to me. -
AlgoRythm4992433dReal answer: it's a design pattern. Separation of concerns. Back in the days of classic PHP and ASP, logic inside/ alongside the UI code turned into the ugliest code of all time. It was degrading to maintain. Inhumane.
REAL answer: do you mix your steak and beer together when you have dinner? Sure, they end up in the same place eventually, but you wouldn't want to eat beer-soaked steak or drink steaky beer. -
BordedDev192932d@AlgoRythm Types are defined separate already, so the PHP/ASP analogy doesn't hold. So, like your steak and beer it's already separate but on the same table
P.S. I'm fairly sure there are beer-based BBQ/steak sauces -
12bitfloat1055832dPeople like to come up with stuff then claim it's best practices that will magically make everything better
There are so many patterns that allegedly make your code better and more testable and more future proof and they're honestly all bad in practice -
lorentz1563714d@AlgoRythm It's like if one side of the table had everyone's beer and the other had all the steak, and you had to walk back and forth to have both.
And the real reason why it's like this is that when the group got together they didn't have beer and plates were crazy expensive so they just ate the steaks from the shared pile, and if you suggest putting the beer alongside the steak for a given person now that the number of plates is purely a matter of convenience they tell you that soaking the shared steak pile in beer sounds disgusting.
Related Rants
Why do react developers like having a separate types folder/file? (genuine Q)
rant
react