3 ms·
The JSX syntax makes React hard to read due to multiple layers of nesting. IMHO, Vue is superior for both maintainability and readability than React. Especiall
by ashishb 3y ago
The JSX syntax makes React hard to read due to multiple layers of nesting.
IMHO, Vue is superior for both maintainability and readability than React. Especially because CSS, JS anda HTML are largely in separate blocks of the same file.
- benatkin 3y agoYou can see this in that Flutter didn't copy JSX and its usability seems better. Not that I'm confident Flutter is worth the trade-offs.
- pmarreck 3y agonarrator: It's not.
- mightyham 3y agoI'm confused about what you mean by this. There's nothing about Flutter's API that encourages less nesting, In fact, it's the exact opposite. Plenty of layout and styling that takes a number of nested widgets in Flutter can be achieved using a single div in React.
- CharlieDigital 3y agoI can understand some of the benefits of JSX, but compared to Vue SFC's, it's a mess to read. React CSS modules feel so unwieldy compared to Vue SFC's inline `scoped` CSS. Vue's approach to templating using `v-for` and `v-if` means that you won't end up with a big block of logic mixed in with the template (you can still do it, but Vue's nature steers you away from it).
- noduerme 3y agoArguably they should all be in external files. HTML in one, CSS in another, and Javascript to load and cache them without any embedded strings. That's how I prefer to write. For one thing, it lets me choose which things I want to cache and which I don't. I can compile from SCSS and deploy without changing any JS or HTML files. Usually my rollups are just the JS.