Hacker News new | ask | show | jobs
by Retozi 4099 days ago
In my opinion it is a misconception that React "mixes" representation and logic.

You can _implement_ both representation and logic with React. (instead of JS for logic, and some clunky template language for representation).

This does not mean that you should mix it. usually you end up with "representation" components that are "dumb", and logic components, that do not care about the representation of their children.

see https://medium.com/@dan_abramov/smart-and-dumb-components-7c...

Just because it shares the implementation mechanism, it does not mean that they are mixed together. You can of course, but most of the time, you should not.

1 comments

This is a great way of separating things. We did this (or something very similar) years ago with ASP.NET and it worked like a charm.