4 ms·
Your component's logic is all presentation logic. You may want to break it even further but it's not a real separation (you still have logic in your templates v
by eyko 10y ago
Your component's logic is all presentation logic. You may want to break it even further but it's not a real separation (you still have logic in your templates via `v-if` and `v-for`, don't you?). Data, in both React and Vue, lives outside the component.
- reza_n 10y ago'For' and 'if' are very basic operations which have equivalent CSS constructs and play extremely well with HTML presentation. I'm not saying your wrong, I'm just saying its a total non issue for designing presentations. Without it, you cannot present modern data (JSON).
- Noseshine 10y agoSo whose preventing you from only using the same basic structures when embedding it like JSX, with Javascript? I don't see why learning a different syntax for the templates improves anything you say. The for loop does not look any better/easier just because you slightly change the way you write it, but you now depend on yet another language.
- reza_n 10y agoWhat's preventing me? My preference for a different kind of separation between data and presentation. No one right or wrong here, just a matter of taste :)
- Noseshine 10y ago> separation between data and presentation That makes no sense. Reminder: We were talking about Javascript vs. custom template language - both are programming languages. One more limited than the other, but that is when I asked why you don't just use the same subset of Javascript. Just variables and basic loops, for example. You have the exact same things in the template language!