developmentseed / developmentseed/pearl-frontend

Adopt common request library

Open
#87 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
21
Forks
5
PR merge metrics
No merged PRs in 30d

Description

The application currently employs various methods to fetch data, such as the custom [useFetch hook](https://github.com/developmentseed/pearl-frontend/blob/fa0ecef5513c282021d029dc7101cb8999f84a12/app/assets/scripts/utils/use-fetch.js#L16) and [direct fetch use](https://github.com/developmentseed/pearl-frontend/blob/d8d82abb27598b9521a0054f2f78cde50422748e/app/assets/scripts/components/profile/project/project.js#L164-L184) within useEffect hooks. I believe we could benefit from utilizing a more robust and community-supported request library.

The [SWR](https://www.npmjs.com/package/swr) module from Vercel appears to be a good choice.

I suggest we use it wherever possible and necessary.

cc @LanesGood

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.