4 ms·
No accounting for taste, I suppose. Writing JSX is a nightmare to me. It's like we've forgotten 20 years worth of hard-earned knowledge about the value of separ
by ForHackernews 3y ago
No accounting for taste, I suppose. Writing JSX is a nightmare to me. It's like we've forgotten 20 years worth of hard-earned knowledge about the value of separation of concerns.
- notpachet 3y agoI agree with you about separation of concerns, but I don't think JSX is the guilty party there, so much as the overarching frontend ethos that pushes the idea of "single file components" to extremes.
- satvikpendem 3y agoWhat is the value of separation of concerns when it comes to UI? Because I find not colocating the logic and styling for a component to be very annoying when it comes to looking for the right files.
- vagrantJin 3y agoThe component DIR should have css, logic/js and template/markup. Seperation of concerns right down to component level. It really comes down to how organised the devs and their tools are.
- satvikpendem 3y agoOr you could put all that stuff in a single-file component or use JSX with atomic CSS or CSS in JS.
- troupo 3y ago> It's like we've forgotten 20 years worth of hard-earned knowledge about the value of separation of concerns. No. We haven't. Because there's a different separation of concerns: https://twitter.com/simonswiss/status/1664736786671869952 https://twitter.com/simonswiss/status/1664736786671869952
- shdh 3y agoJSX is an anti-pattern IMO. People just don’t wana see it as such.
- blackoil 3y agoDo a 5 why for separation of concern and you'll find JSX is more logical. You want things edited together to be closer in code also. A single file or couple of files next to each other that decide structure, behaviour and view of a component is better than few CSS/JS for whole site.
- nathias 3y agoif that's what you thought separation of concerns meant it's best to forget it