3 ms·
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 fr
by noir_lord 8y ago
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.
- RussianCow 8y agoThis 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.