2 ms·
I will have to disagree with you on this. The answer is not cut and dried though. Code slowly starts to become spaghetti when you start putting in more and more
by agnivade 9y ago
I will have to disagree with you on this. The answer is not cut and dried though. Code slowly starts to become spaghetti when you start putting in more and more UI logic into it. At one point of time, it just becomes a complete mess of if conditions, $.each loops and when you start putting $("#div").("data-something", "value"), you know its spaghetti time.
Personally, I feel the components approach keeps it sane. Just let your v-dom layer do all the work. Use a state management library if needed.
Just my 2 cents.