Skip to content

Conversation

@citypaul
Copy link
Contributor

I was struggling to understand why the devTools were not rendering in our application. The docs currently state that if process.env.NODE_ENV === 'production', they will not be included in the build.

However, this is misleading, because the actual logic as you can see here is to only include the devTools if process.env.NODE_ENV === 'development'.

In the app I was working on, during development, our NODE_ENV was actually set to dev. While I understand it's a convention in the node world to use process.env.NODE_ENV === 'development', for whatever reason this app was setup slightly differently, and the docs were somewhat misleading here. Hopefully this should prevent someone else from experiencing the same confusion.

@vercel
Copy link

vercel bot commented Sep 23, 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/4u7GEAseDk5uBwK6vsMZumpqfKEf
✅ Preview: https://react-query-git-fork-citypaul-devtools-doc-d0e816-tannerlinsley.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 23, 2021

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 2ed944f:

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

Clarify node env logic for devTools to make it clear that the environment should be set to 'development'
@citypaul citypaul force-pushed the devtools-docs-node-env branch from 3c20b26 to 2ed944f Compare September 23, 2021 10:24
@TkDodo TkDodo merged commit f7854e0 into TanStack:master Sep 23, 2021
@citypaul citypaul deleted the devtools-docs-node-env branch September 23, 2021 12:08
@tannerlinsley
Copy link
Member

🎉 This PR is included in version 3.24.5 🎉

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.

3 participants