News for hackers. Stuff that matters.
Re:A set of best practices for JavaScript projects by underwater on Wednesday July 05, 2017 @05:55AM (#14701095)
I'm not so sure that's a good idea. A component is one possible interface to the business logic, but there isn't necessarily a 1:1 mapping.

Colocating data logic together makes it easier to build a data model that is logical and consistent, rather than one that is coupled to UI decisions.

Re:A set of best practices for JavaScript projects by Illniyar on Wednesday July 05, 2017 @08:56AM (#14701988)
It's not a black and white thing, you can have a feature structure for your UI and services, and one folder with just the data models.

Sometimes your frameworks kinda force it on you too.

Re:A set of best practices for JavaScript projects by nickthemagicman on Wednesday July 05, 2017 @11:47AM (#14703364)
Wow. Came here to make this comment. It seems like the whole point of a model layer is to decouple it from the UI and the Controllers.