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

fix: useUnmountEffect now invokes changing effect functions #758

Merged
merged 1 commit into from
May 12, 2022
Merged

Conversation

xobotyi
Copy link
Contributor

@xobotyi xobotyi commented May 12, 2022

fix #756

How does this PR fix the problem?

Use useSyncedRef to handle effector changes.

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?

@xobotyi xobotyi added the 🕯️ bug fix One or more bugs fixed label May 12, 2022
@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #758 (d5eb0b8) into master (161ac31) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #758   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           52        54    +2     
  Lines          896       916   +20     
  Branches       166       170    +4     
=========================================
+ Hits           896       916   +20     
Impacted Files Coverage Δ
src/useUnmountEffect/useUnmountEffect.ts 100.00% <100.00%> (ø)
src/index.ts 100.00% <0.00%> (ø)
src/useVibrate/useVibrate.ts 100.00% <0.00%> (ø)
src/__tests__/navigator.vibrate.ts 100.00% <0.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 161ac31...d5eb0b8. Read the comment docs.

@xobotyi xobotyi merged commit 380637a into master May 12, 2022
@xobotyi xobotyi deleted the fix-756 branch May 12, 2022 12:24
github-actions bot pushed a commit that referenced this pull request May 12, 2022
## [14.2.1](v14.2.0...v14.2.1) (2022-05-12)

### Bug Fixes

* `useUnmountEffect` now invokes changing effect functions ([#758](#758)) ([380637a](380637a)), closes [#756](#756)
@xobotyi
Copy link
Contributor Author

xobotyi commented May 12, 2022

🎉 This PR is included in version 14.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕯️ bug fix One or more bugs fixed released
Development

Successfully merging this pull request may close these issues.

useUnmountEffect - callback is not updated when it changes
1 participant