FACN8 / Pokemon

0 stars 1 forks source link

No catch blocks for errors #35

Open LogicX1 opened 4 years ago

LogicX1 commented 4 years ago

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])

ghost commented 4 years ago

thank you for the comment, very interesting suggestion i will implement it in next project