Skip to content

Add react query devtools - #1238

Merged
just-be-dev merged 1 commit into
mainfrom
add-devtools
Oct 18, 2022
Merged

just-be-dev merged 1 commit into
mainfrom
add-devtools

Conversation

@just-be-dev

@just-be-dev just-be-dev commented Oct 18, 2022 •

Copy link
Copy Markdown
Contributor

Just adds react query devtools as a persistent part of our setup.

As per the the docs:

By default, React Query Devtools are only included in bundles when process.env.NODE_ENV === 'development', so you don't need to worry about excluding them during a production build.

I've verified that this doesn't show up in a prod build.

It'd be nice to change the icon to something different but it's not easy to do that so meh.

@vercel

vercel Bot commented Oct 18, 2022

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
console-ui-storybook ✅ Ready (Inspect) Visit Preview Oct 18, 2022 at 0:33AM (UTC)

@just-be-dev
just-be-dev merged commit 733a7f1 into main Oct 18, 2022
@just-be-dev
just-be-dev deleted the add-devtools branch October 18, 2022 01:34
david-crespo added a commit that referenced this pull request Nov 11, 2026
Nothing in the repo references these packages any more. The lockfile
goes from 709 to 704 entries. `tslib` and `@react-router/node` stay
installed as dependencies of other packages, so for those two this only
tidies `package.json`. Lint, tsc, build, and the vitest suite pass. I
did not run e2e locally.

- `tslib` came from the Nx generator that created the repo
([source](https://github.com/nrwl/nx/blob/313552b/packages/react/src/schematics/init/init.ts#L55-L61)),
along with `importHelpers: true` in tsconfig, which tells tsc to import
helpers like `__awaiter` from tslib instead of inlining them. tsc never
emitted our build (that was Babel, then Vite), but with `importHelpers`
on, typechecking fails with TS2354 if tslib can't be resolved and the
target needs a helper, as ours did while it was es2015. #2078 raised the
target to es2020 and #3075 removed `importHelpers`. It is still
installed through `@peculiar/x509` and others.
- `@tailwindcss/container-queries` was added in #2654 for the
`@container` and `@[48rem]:` variants on the instance metrics tabs,
loaded as a plugin in `tailwind.config.ts`. Tailwind 4 [has container
queries built
in](https://github.com/tailwindlabs/tailwindcss-container-queries/blob/7a968b3/README.md?plain=1#L1-L2),
and #2910 deleted the config file that loaded the plugin but left the
package.
- `@tanstack/react-query-devtools` was added in #1238 to show the React
Query devtools panel in dev. It was commented out in
cc67cff to keep it out of screenshots,
and #3400 deleted the commented-out lines.
- `react-is` and `@types/react-is` also came from the Nx generator,
which adds them alongside styled-components
([source](https://github.com/nrwl/nx/blob/313552b/packages/react/src/utils/styled.ts#L18-L28))
because styled-components 5 has react-is as a peer dependency. We
replaced styled-components with emotion in
451bef6. `@reach/menu-button` 0.16 also
had react-is as a peer dependency until #1395 replaced it with Radix,
and no package in the lockfile has had one since. Nothing in the repo
has ever imported react-is, so the types were never used.
- `@react-router/node` was added in #3400, following the [React Router
SPA
guide](https://github.com/remix-run/react-router/blob/f482813/docs/how-to/spa.md#L38),
which says a project needs it for the build-time render of `index.html`.
Our `entry.server.tsx` uses web streams and doesn't import it, and
`@react-router/dev` already depends on the exact same version, so it
stays installed.

This branch was successfully deployed

1 active deployment
Preview — 7250c459 Deployed Oct 18, 2022 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants