-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Make hydrationQueue a derived value #9247
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
Make hydrationQueue a derived value #9247
Conversation
…te to a derived value
View your CI Pipeline Execution ↗ for commit 893f377.
☁️ Nx Cloud last updated this comment at |
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.
awesome, exactly how I imagined it would look
ah, the eslint disable is still needed it seems:
|
Yeah, my editor linting was acting up and told me it was safe to remove. 😞 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9247 +/- ##
===========================================
+ Coverage 45.33% 84.29% +38.95%
===========================================
Files 207 25 -182
Lines 8271 363 -7908
Branches 1860 108 -1752
===========================================
- Hits 3750 306 -3444
+ Misses 4080 48 -4032
+ Partials 441 9 -432 🚀 New features to boost your workflow:
|
After the fixes in:
#9157
#9188
I noticed a version of this bug was still happening: #8677
@TkDodo Pointed out a potential solution, which is to move
hydrationQueue
from being a state, to being a derived value instead.I think this makes a lot of sense. It should always be safe to recalculate this and there should be no situation where the component rerenders without the effect running where we want to preserve the values.
Tests are passing without changes.