Skip to content

Conversation

@dhirajarun
Copy link
Contributor

This will stop unnecessary rerender of devtools when they are closed.

fix of issue #4097

This will stop unnecessary rerender of devtools when they are closed.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 11, 2022

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 f6894d3:

Sandbox Source
@tanstack/query-example-react-basic Configuration
@tanstack/query-example-react-basic-typescript Configuration

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2022

Codecov Report

Base: 96.36% // Head: 96.83% // Increases project coverage by +0.46% 🎉

Coverage data is based on head (f6894d3) compared to base (eab6e2c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4146      +/-   ##
==========================================
+ Coverage   96.36%   96.83%   +0.46%     
==========================================
  Files          45       58      +13     
  Lines        2281     2682     +401     
  Branches      640      789     +149     
==========================================
+ Hits         2198     2597     +399     
- Misses         80       83       +3     
+ Partials        3        2       -1     
Impacted Files Coverage Δ
src/core/queryClient.ts
src/react/setLogger.ts
src/react/setBatchUpdatesFn.ts
src/core/retryer.ts
src/devtools/utils.ts
src/core/notifyManager.ts
src/devtools/Logo.tsx
src/react/useBaseQuery.ts
src/react/logger.ts
src/devtools/useLocalStorage.ts
... and 93 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TkDodo
Copy link
Collaborator

TkDodo commented Sep 11, 2022

wouldn't a simpler way be to conditionally render the whole ReactQueryDevtoolsPanel if we want to have it closed, possibly here:

<ReactQueryDevtoolsPanel

The variable to check is !isResolvedOpen

@dhirajarun
Copy link
Contributor Author

Yeah, I tried that, but Transition(animation) gets removed.

@TkDodo TkDodo merged commit dcf6d7b into TanStack:main Sep 12, 2022
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.

3 participants