News for hackers. Stuff that matters.
Re:Vue.js: the good, the meh, and the ugly by noir_lord on Thursday July 05, 2018 @05:07PM (#17466859)
I just put those Api calls in a module in the same dir as the component usually.

Then api.fetchFoo(bar).then() mostly does it.

Benefit is separation of API from component.

Re:Vue.js: the good, the meh, and the ugly by RussianCow on Thursday July 05, 2018 @05:41PM (#17467081)
This doesn't actually solve the dilemma of where to put the logic—all you've done is moved the API code into its own object, but your component is still the one controlling the higher-level flow in this case.