Thanks for your great post. I would like to know, with the same sample code, in addition to the error message, how would you display a "Retry" button to fire a new API call?
Hi @mykel
,
Excellent question! In that case I think I would just move the loading logic into a new function that I can then return from the hook as well: gist.github.com/nico-martin/24de58...
Hi @nicomartin ,
Thanks for your great post. I would like to know, with the same sample code, in addition to the error message, how would you display a "Retry" button to fire a new API call?
Hi @mykel ,
Excellent question! In that case I think I would just move the loading logic into a new function that I can then return from the hook as well:
gist.github.com/nico-martin/24de58...
Thanks for the answer.