3 ms·
Haven't used VueJS but the obvious thing to me would be to do your data transformations before hitting the view code - separating view code from business logic.
by LouisSayers 9y ago
Haven't used VueJS but the obvious thing to me would be to do your data transformations before hitting the view code - separating view code from business logic.
So is this really a problem?
- chrisco255 9y agoYou don't always want to transform data, sometimes this is merely a UI concern...as in filtering, sorting, etc.
- LouisSayers 9y agoYeah, so filter and sort it before you hit the view (and by this I mean the markup jsx or whatever) code, and problem solved ;) Classic MVVM pattern
- ng12 9y agoThen you're back at OPs original complaint which was that loops take you away from the markup you're currently writing.
- LouisSayers 9y agoSorry, I shouldnt have said 'business logic' here. I really mean separating presentation and presentation data.