|
|
|
|
|
by threatofrain
3230 days ago
|
|
I'd argue that back then, focusing on elegant CSS was also a mistake. Outside of well-done libraries, I've never really perceived code re-use as a big force multiplier. Even now with React, I still don't see much code re-use outside of libraries. When you want your code to be re-used... you exercise the discipline that a library author would. You add typings, you add documentation, you add tests, you create a Github page where people can provide info. Taking someone else's code is a commitment, so you at least want the reassurance of library-quality code. Otherwise when you write a component, whether in the old school html/css/js split, or in React, you're unlikely to write the component in a way that optimizes for generality, and optimizing for generality, as opposed to the narrow business case in front of you, is often a lot harder. |
|