Skip to content
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

feat(useAsync): remove effector behaviour from hook #339

Merged
merged 2 commits into from
Sep 23, 2021
Merged

Conversation

xobotyi
Copy link
Contributor

@xobotyi xobotyi commented Sep 21, 2021

Use composition with effectors for such functionality.

BREAKING CHANGE:
useAsync hook now has only 2 arguments, asyncFn and initialValue
and do not execute provided function on its own.

How does this PR fix the problem?

Remove effector functionality and unnecessary arguments.

Checklist

  • Have you read contribution guideline?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Is there an existing issue for this PR?
  • Have the files been linted and formatted?
  • Have the docs been updated to match the changes in the PR?
  • Have the tests been updated to match the changes in the PR?
  • Have you run the tests locally to confirm they pass?

Use composition with effectors for such functionality.

BREAKING CHANGE:
`useAsync` hook now has only 2 arguments, `asyncFn` and `initialValue`
and do not execute provided function on its own.
@xobotyi xobotyi added the ✨ enhancement New feature or request label Sep 21, 2021
@xobotyi xobotyi requested a review from JoeDuncko September 21, 2021 21:35
@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #339 (b104794) into master (5334f94) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #339   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           43        43           
  Lines          748       744    -4     
  Branches       133       132    -1     
=========================================
- Hits           748       744    -4     
Impacted Files Coverage Δ
src/index.ts 100.00% <ø> (ø)
src/useAsync/useAsync.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5334f94...b104794. Read the comment docs.

Copy link
Contributor

@JoeDuncko JoeDuncko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xobotyi xobotyi merged commit 0e47ff2 into master Sep 23, 2021
github-actions bot pushed a commit that referenced this pull request Sep 23, 2021
# [10.0.0](v9.0.0...v10.0.0) (2021-09-23)

### Features

* **useAsync:** remove effector behaviour from hook ([#339](#339)) ([0e47ff2](0e47ff2))

### BREAKING CHANGES

* **useAsync:** `useAsync` hook now has only 2 arguments, `asyncFn` and `initialValue`
and do not execute provided function on its own.

* chore(useAsync): remove unused `IUseAsyncOptions` interface
@xobotyi
Copy link
Contributor Author

xobotyi commented Sep 23, 2021

🎉 This PR is included in version 10.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@xobotyi xobotyi deleted the fix-319 branch September 23, 2021 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request released
Development

Successfully merging this pull request may close these issues.

2 participants