refactor(api): split and host api/index.js functions in *.api.js#367
refactor(api): split and host api/index.js functions in *.api.js#367machour wants to merge 2 commits intogitpoint:masterfrom machour:api-banana-split-2
Conversation
| fetchUserEvents, | ||
| fetchStarCount, | ||
| } from 'api'; | ||
| } from '../user/user.api'; |
There was a problem hiding this comment.
We have aliases, so that you can replace everywhere relative paths like ../user/user.api with user/user.api, should work as before.
|
I'm having second thoughts about this refactoring, as these functions doesn't seem to belong there:
It would make more sense to host the API related functions under I also think we should consider renaming those functions in order to have more conventional names. I had a look at several GitHub clients apis over the last days, and I really love the naming node-github adopted. I've opened a proposal in #348 to switch to this library for v3, but I'm not sure how it would play with our redux/normalizr plans.. Furthermore, we could even make use of this file in a little script to generate our API functions (only the one needed in the app). 🤔 Something to consider right after release Monday! |
|
Thank you so much mate for taking the time to split these up in their separate domains. I think this is tons better than having a single That being said I kinda agree. Having everything named Will love to hear other's opinions on this as well. Also happy to merge this in now if you would like to deep-dive and refactor and fix things up next week or close this since we'll be doing that anyway :) |
|
Closing this for now, we'll handle that more properly next week 🙌 |
Following up on #361