-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useAsyncEffect hook #35
useAsyncEffect hook #35
Conversation
Codecov Report
@@ Coverage Diff @@
## master #35 +/- ##
==========================================
+ Coverage 93.65% 94.06% +0.40%
==========================================
Files 12 13 +1
Lines 205 219 +14
Branches 23 25 +2
==========================================
+ Hits 192 206 +14
Misses 12 12
Partials 1 1
Continue to review full report at Codecov.
|
I think there could possibly be better testing around dependency changes, but it's a good start. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Just a few minor comments to cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea!
Awesome idea for a hook, thanks @myty! |
Published with v0.1.4 |
@all-contributors add @myty for code, test |
I've put up a pull request to add @myty! 🎉 |
@all-contributors add @dylanjustice for review |
I've put up a pull request to add @dylanjustice! 🎉 |
This hook takes the common pattern of executing an async function in a useEffect hook and cleans it up a little bit.
So something like this:
becomes this: