query: Error Coming from ReactQueryDevTools: "Warning: Prop `style` did not match."
Bug Description: After upgrading to React Query 3 with built in dev tools, I am getting an error in my browser console every time I hard refresh my application. I tried removing the <ReactQueryDevTools initialIsOpen /> component from my _app.js file and the error was no longer showing. The error is showing in every browser I tried. I am using Next.js for what it’s worth.
Here’s the error I am getting:

And here’s the stack trace below the error:

Here’s my _app.js:
import { ReactQueryDevtools } from "react-query/devtools"
import { QueryClient, QueryClientProvider } from "react-query"
const queryClient = new QueryClient()
export default function App({ Component, pageProps }) {
return (
<QueryClientProvider client={queryClient}>
<Component {...pageProps} />
<ReactQueryDevtools initialIsOpen />
</QueryClientProvider>
)
}
Versions:
- React Query Version: 3.5.11
- React Version: 16.13.1
- Next.js Version: 10.0.3
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (4 by maintainers)
@UNLRN You’re not supposed to be nesting anything in
<ReactQueryDevTools />. Do it like this instead:I’m also seeing the hydration warning when using
ReactQueryDevtools(react-query version 3.6.0) in a Next.js application:For anyone else having this same warning - for me it only occurs after a full page reload AND if the screen width is less than 500px. I believe this is the cause: https://github.com/tannerlinsley/react-query/blob/master/src/devtools/styledComponents.ts#L103
This issue can be closed 👍 Fixed in 3.21.1.
I’m also getting the warning on a full page reload on mobile on
3.21.0. This issue should be re-opened 😃Alright, I’ll give it a shot 😃
hmm, we had an issue like that recently: https://github.com/tannerlinsley/react-query/issues/1543
and it was fixed here: https://github.com/tannerlinsley/react-query/pull/1613
which was released in
3.5.14. The issue states you are on3.5.11- can you try upgrading please?