Open finnhodgkin opened 7 years ago
Handlers should be handling server things not manipulating api data. This functionality would be more at home in myRequest.js or preferably a totally new file:
myRequest.js
https://github.com/tyeung2017/sunsetly/blob/master/src/handlers.js#L38-L55
It's all testable logic so should definitely be abstracted into separate pure functions.
I know it's difficult because there are nested requests but it's still very possible and necessary.
Handlers should be handling server things not manipulating api data. This functionality would be more at home in
myRequest.js
or preferably a totally new file:https://github.com/tyeung2017/sunsetly/blob/master/src/handlers.js#L38-L55
It's all testable logic so should definitely be abstracted into separate pure functions.