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 #478 - fixed useParams not updating issue #479

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

khavin
Copy link
Contributor

@khavin khavin commented Aug 17, 2024

useCachedParams hook do not update the Params0 (useRef reference) value, if the previous value is a non empty object and the current value is an empty object.

More information regarding the issue: #478

Updated useCachedParams to fix this. Added a test case which tests for this behavior.

Copy link

stackblitz bot commented Aug 17, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

codecov bot commented Aug 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (3d1f732) to head (1e612d8).
Report is 1 commits behind head on v3.

Additional details and impacted files
@@            Coverage Diff            @@
##                v3      #479   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            1         1           
=========================================
  Hits             1         1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@molefrog
Copy link
Owner

@khavin Thank you for spotting this bug! It looks good, I'm going to release this right away.

@molefrog molefrog merged commit 75d5e45 into molefrog:v3 Aug 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants