refactor(frontend): fetch to axios #22

Merged
mcataford merged 2 commits from refactor/fetch-to-axios into main 2023-08-18 05:24:13 +00:00
mcataford commented 2023-08-18 05:21:17 +00:00 (Migrated from github.com)

Initially, fetch had been chosen because it didn't require extra dependencies. Pain points accumulated during development, especially around making sure testing remained somewhat elegant and didn't grow out of proportion in complexity.

After adding the upload, fetch and deletion flows, toying with the "file download" path opened up a new can of worms that made axios more attractive. Now that it's past v1, it feels more stable and the mock utility for tests is convenient.

axios-mock-adapter will ideally be replaced by a smaller, handrolled mock at some point, but for now, the dependency feels acceptable.

Initially, `fetch` had been chosen because it didn't require extra dependencies. Pain points accumulated during development, especially around making sure testing remained somewhat elegant and didn't grow out of proportion in complexity. After adding the upload, fetch and deletion flows, toying with the "file download" path opened up a new can of worms that made `axios` more attractive. Now that it's past v1, it feels more stable and the mock utility for tests is convenient. `axios-mock-adapter` will ideally be replaced by a smaller, handrolled mock at some point, but for now, the dependency feels acceptable.
This repo is archived. You cannot comment on pull requests.
No description provided.