6 ms·
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 f
by Retozi 11y 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-7ca2f9a7c7d0 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.
- jbergens 11y agoThis 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.