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: make useRerender operate integer increment instead of bool switch #711

Merged
merged 2 commits into from
Apr 10, 2022

Conversation

xobotyi
Copy link
Contributor

@xobotyi xobotyi commented Apr 10, 2022

What is the current behavior, and the steps to reproduce the issue?

Even amount of useRerender calls causes no rerender.

What is the expected behavior?

useRerender should cause rereder in any case

How does this PR fix the problem?

Replace boolean switch with integer incrementation. Also it is guarded from overflow.

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?

@codecov
Copy link

codecov bot commented Apr 10, 2022

Codecov Report

Merging #711 (8543d80) into master (6548831) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 8543d80 differs from pull request most recent head b543b40. Consider uploading reports for the commit b543b40 to get more accurate results

@@            Coverage Diff            @@
##            master      #711   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           50        50           
  Lines          865       865           
  Branches       162       162           
=========================================
  Hits           865       865           
Impacted Files Coverage Δ
src/useRerender/useRerender.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 f95b6e3...b543b40. Read the comment docs.

@xobotyi xobotyi merged commit 409a21f into master Apr 10, 2022
@xobotyi xobotyi deleted the fix-rerender branch April 10, 2022 19:30
github-actions bot pushed a commit that referenced this pull request Apr 10, 2022
## [13.2.1](v13.2.0...v13.2.1) (2022-04-10)

### Bug Fixes

* make `useRerender` operate integer increment instead of bool switch ([#711](#711)) ([409a21f](409a21f)), closes [#691](#691)
@xobotyi
Copy link
Contributor Author

xobotyi commented Apr 10, 2022

🎉 This PR is included in version 13.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
Development

Successfully merging this pull request may close these issues.

1 participant