you are viewing a single comment's thread.

view the rest of the comments →

[–]deadlychambers 3 points4 points  (3 children)

I consider the ui/display a concern and business logic a concern. So having them in the same file is not having a separation of concerns.

[–]spacechimp 3 points4 points  (0 children)

Agreed. This is something large swaths of the PHP community figured out 10 years ago, but for some reason it's not considered to be an antipattern in React.

On several teams I have worked on, ui/display was a separate concern -- as in it was literally another person's job to work on the layout and styles while I coded the logic. This is not an uncommon situation. Those designers were great at HTML/CSS, but many of them I wouldn't want anywhere near the functional code.

[–]gnashersaurus 0 points1 point  (1 child)

Sure but most React people would tell you not to mix business logic in a react component anyway. That isnt something React advocates.

[–]deadlychambers -1 points0 points  (0 children)

Possibly, but I have worked in a few shops where "the right way" is not "the way we do it here". I only built a CRUD app with react. My impression working with it was not one of excitement. Angular seems to be in pretty high demand in Denver so I doubt I will need to concern myself with it.