Don't know the best way to handle errors, but for me i had an error state,
when the api request fails, u will catch it with .catch , it will change the error state , and when that happens it will deal with that error, maybe with something like this :
useEffect(()=>{...
}
,[errState])
Don't know the best way to handle errors, but for me i had an error state, when the api request fails, u will catch it with .catch , it will change the error state , and when that happens it will deal with that error, maybe with something like this : useEffect(()=>{... } ,[errState])