You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a custom useApi() hook that can manage isLoading, errors, isSuccessful (?), and the return type. This should be able to handle gets and posts. It should take a param for the URL segment for the API, but encapsulate the process.env.API_URL within it. It should also take a param to determine if it should run at first or be delayed (i.e. we don't want POSTs to run on load, but GETs we probably do)
Once useApi() hook is created, replace all API calls with it.
The text was updated successfully, but these errors were encountered:
Create a custom useApi() hook that can manage isLoading, errors, isSuccessful (?), and the return type. This should be able to handle gets and posts. It should take a param for the URL segment for the API, but encapsulate the process.env.API_URL within it. It should also take a param to determine if it should run at first or be delayed (i.e. we don't want POSTs to run on load, but GETs we probably do)
Once useApi() hook is created, replace all API calls with it.
The text was updated successfully, but these errors were encountered: