Addresses #7, leveraging our useAsync hook to encapsulate async-data loading, error, return-value tracking, and subsequent update calls. This branch is based off of #21, and shouldn't merge before that.
To test, you can take advantage of the sleep() function I've created. By changing the useAsync callback from whatever it is now to an async fn that awaits a call to sleep() will allow you to log and see that loading is triggering successfully. Additionally, you can throw errors from within that fn to ensure it handles errors appropriately.
Addresses #7, leveraging our useAsync hook to encapsulate async-data loading, error, return-value tracking, and subsequent update calls. This branch is based off of #21, and shouldn't merge before that.
To test, you can take advantage of the
sleep()
function I've created. By changing the useAsync callback from whatever it is now to an async fn thatawait
s a call tosleep()
will allow you to log and see that loading is triggering successfully. Additionally, you can throw errors from within that fn to ensure it handles errors appropriately.