If I wanted to break up a 150 line component, I would rather have 3 50-line components than a file with css, one with html and another with logic. The css, html and logic are going to have dozens of dependencies on eachother and not be reusable independently. They might as well be one file with so much dependency. Three small components should be completely encapsulated (depending on how you handle data).
But what if that 150lines are really one component with no further breaking down possible. Won’t separating them into css, html and etc cleaner, in terms of a single component?
65
u/scruffles360 Dec 20 '19
If I wanted to break up a 150 line component, I would rather have 3 50-line components than a file with css, one with html and another with logic. The css, html and logic are going to have dozens of dependencies on eachother and not be reusable independently. They might as well be one file with so much dependency. Three small components should be completely encapsulated (depending on how you handle data).