Skip to content
Source
Sign inSign up
TanStack/devtools

UI renders twice with react strict mode #402

Closedxt0rted(GitHub profile, opens in a new tab) opened this issue 1 comment

TanStack Devtools version

v0.10.0

Framework/Library version

React v19.2.4

Describe the bug and the steps to reproduce it

If the app is rendered without using <StrictMode> then a single devtools UI is rendered, but if you wrap your app so it runs in strict mode two copies of the devools UI will render.

This isn't noticeable unless you resize the tools window. You can see this behavior in the basic example embedded in the docs. Add StrictMode to the react import and update the last line to root.render(<StrictMode><App /></StrictMode>).

https://tanstack.com/devtools/latest/docs/framework/react/examples/basic?panel=sandbox

Screenshots or Videos (Optional)

Default view when open

Image

Shrink the tools down and the second copy will show

Image

Do you intend to try to help solve this bug with your own PR?

No, because I do not have time to dig into it

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
  1. To view the behavior in the the provided example, simply import StrictMode from react and change the last line of index.tsx to root.render(<StrictMode><App /></StrictMode>)

  2. AlemTuzlak closed this

Sign in to join this conversation.