-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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(devtools): make sure that sort function is properly read from localStorage #3703
fix(devtools): make sure that sort function is properly read from localStorage #3703
Conversation
Codecov Report
@@ Coverage Diff @@
## beta #3703 +/- ##
==========================================
- Coverage 97.11% 96.81% -0.31%
==========================================
Files 50 57 +7
Lines 2391 2668 +277
Branches 706 784 +78
==========================================
+ Hits 2322 2583 +261
- Misses 67 83 +16
Partials 2 2
Continue to review full report at Codecov.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit f50c04c:
|
9c6e28f
to
c0587ff
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…s when the returned element is not used for assertions
c0587ff
to
f6d93cc
Compare
Fix for: #3639: DevTools doesn't remember the sort function
This effect is causing the problem. Good news is that it's also completely unneeded as it's doubling what's already done via useLocalStorage. And if the runs after (which it usually does), it disregards the value that's read by
useLocalStorage
hook - which is exactly what causes the bug.This is easily fixable by simply removing the effect.