News for hackers. Stuff that matters.
Re:Responsible JavaScript: Part I by c0wboyc0ding on Monday April 15, 2019 @10:26AM (#19665519)
I would also love to see resources that detail how to separate business logic from view components. As a junior dev, I know it's the right thing to do but I'm not sure how. Is it as simple as passing props into a utils file?

Any links would be greatly appreciated.

Re:Responsible JavaScript: Part I by parthdesai on Monday April 15, 2019 @10:36AM (#19665616)
Re:Responsible JavaScript: Part I by ep103 on Monday April 15, 2019 @10:39AM (#19665642)
So I'm aware of the difference between presentation and compositional components, but the original poster was claiming service calls shouldn't be in lifecycle methods? Abramov puts his api calls into ComponentDidMount in his egghead.io videos...
Re:Responsible JavaScript: Part I by phponpcp on Monday April 15, 2019 @01:54PM (#19667249)
That doesn't scale after awhile. Generally the next step is putting your business logic in HOCs or Redux thunks or sagas. Now it can be dropped in hooks too.