DEV Community

Discussion on: Why Is This An "Anti-Pattern" in React???

 
bytebodger profile image
Adam Nathaniel Davis • Edited

I actually have this in my list as an item to blog about. The topic I'm referencing is the idea (that I've witnessed lately) amongst many React devs that we need to religiously separate our business logic and our display logic. The only issue I take with that is that, in most React applications, almost all the logic is display logic. And thus, IMHO, much of the logic actually belongs in the function/component where it's being rendered. Of course, there are exceptions to this. And I'm not saying that there's not a time-and-place to break out some of the business logic into separate components/functions/layers. But there are far too many people holding onto the old MVC edicts who think that damn near any "logic" should be washed out of React components. I... have a more nuanced opinion on such things.