Skip to content

"No QueryClient set" when upgrading from 3.12.0 to 3.12.1 #1936

@hmaurer

Description

@hmaurer

Describe the bug

When upgrading from react-query@3.12.0 to react-query@3.12.1, getting the following error in the browser console:

QueryClientProvider.js:36 Uncaught (in promise) Error: No QueryClient set, use QueryClientProvider to set one
    at useQueryClient2 (QueryClientProvider.js:36)
    at ReactQueryDevtoolsPanel2 (devtools.js:267)

To Reproduce

git clone git@gist.github.com:5ae9c1e18b571bafe17da22775b28329.git react-query-1936
cd react-query-1936
npm install
npm run dev

Open the dev server in the browser. You should see a blank page and observe the following error in the browser console:

QueryClientProvider.js:36 Uncaught (in promise) Error: No QueryClient set, use QueryClientProvider to set one
    at useQueryClient2 (QueryClientProvider.js:36)
    at ReactQueryDevtoolsPanel2 (devtools.js:267)

Now change the version of react-query in package.json to 3.12.0, run npm install and re-start the dev server (interrupt npm run dev and run it again). You should now see App on the page and no error in the console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions