Hacker News new | past | comments | ask | show | jobs | submit login

I also like my components to be tightly coupled.

Ah Javascript programmers, you are a source of constant entertainment:

     https://en.wikipedia.org/wiki/Loose_coupling



When a component only ever has one template that defines its markup, and the template is only ever used by a single component, and the template needs to change when the component changes, and the component needs to change when the template changes: if these are all true (and they often are for UI components), then there's little to no upside to separating them physically or linguistically.


While I saw that comment coming a mile off, "tight coupling" of your components to their templates is not quite the same thing as tightly coupling completely seperate classes with completely different datasets and responsibilities.


Not familiar with reactjs? You need to have loosely coupled tight components.


mixed with something looking like HTML that is NOT HTML. I love React it's the first js framework that doesn't make me wanna puke, but Jsx it's just the iPhone of template languages. It's fine and eveeybody understand it but it's far from great


OP did not mean "tightly coupled" in the traditional OO sense. They meant that they prefer their presentation to be coupled with their logic, which is how React components work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: