4 ms·
I find the JSX loop infinitely easier to understand what's going on. It's a javascript map. With your Vue example, what is listItem? An array? Can it be an obje
by sergiotapia 9y ago
I find the JSX loop infinitely easier to understand what's going on. It's a javascript map. With your Vue example, what is listItem? An array? Can it be an object? Does listItem need a special decorator for v-for to be able to loop through it?
So many initial questions that just aren't there if you just use Javascript.
- jaequery 9y agoit's just plain for(x in list){ .. } v-for="item in list" if you need idx: v-for="(item, i) in list" pretty standard stuffs
- PrunJuice 9y agoI thought the whole point was that you didn't have to write loops in Vue.js and yet here is a loop in Vue.js.
- moo360 9y agoCool, but in JSX it's just javascript as you would write it anywhere else in your app, except encapsulated in braces. How is that not simpler for people who should be Javascript developers?
- jwdunne 9y agoI'm not entirely sold on Vue, I've never used it before, and I'm happy to use JSX but the Vue template code is far, far clearer to me.