4 ms·
> Which is a big improvement already, as adding and maintaining the new logic only requires you to look at one place instead of several, and it makes it general
by kevmo314 5y ago
> Which is a big improvement already, as adding and maintaining the new logic only requires you to look at one place instead of several, and it makes it generally more readable and less prone to errors.
It's interesting to think about the other HN thread discussion about comments vs one-time-call function abstractions in this light: https://news.ycombinator.com/item?id=27546135 https://news.ycombinator.com/item?id=27546135
I'm a big fan of "put code in one place" too. It was the biggest factor that convinced me that JSX was a great idea compared to separating the templating logic out.
- adflux 5y agoAgreed, which is why I love vue components so much