Skip to content

Conversation

@lukemorales
Copy link
Contributor

As discussed with @tannerlinsley in #2381, this PR changes the current Devtools render behavior to only render the component when NODE_ENV === 'development'.

The current verification only disables Devtools for production mode, which causes Devtools to be rendered when NODE_ENV === 'test' and creates some issues on tests such as Devtools being rendered on snapshots and triggering a lot of jests warnings. This PR solves this issue.

@vercel
Copy link

vercel bot commented Jun 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-query/D8QDagprwkFKYqNVkPHaVWeCVtua
✅ Preview: https://react-query-git-fork-lukemorales-fix-displ-03ac3e-tannerlinsley.vercel.app

@codesandbox-ci
Copy link

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 93892a5:

Sandbox Source
tannerlinsley/react-query: basic Configuration
tannerlinsley/react-query: basic-typescript Configuration

@lukemorales lukemorales changed the title fix: display devtools only in production fix: display devtools only in development Jun 16, 2021
@tannerlinsley tannerlinsley merged commit 772c6c4 into TanStack:master Jun 16, 2021
@tannerlinsley
Copy link
Member

🎉 This PR is included in version 3.17.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants