Currently we only account for the API calls to succeed, but we dont show any UI for when an API call fails. It would be nice to have a loading state and an error state as well.
We should implement this for both api calls:
The api call for getting the list of pokemon (loading/error)
The api call for getting the details of a single pokemon (loading/error)
Currently we only account for the API calls to succeed, but we dont show any UI for when an API call fails. It would be nice to have a loading state and an error state as well.
We should implement this for both api calls:
You can use
.catch(() => {})
to set error states.