Skip to content

docs(devtools): add missing devtools import to troubleshooting example#3501

Merged
dbritto-dev merged 1 commit into
pmndrs:mainfrom
TheSeydiCharyyev:docs/devtools-troubleshooting-import
May 20, 2026
Merged

docs(devtools): add missing devtools import to troubleshooting example#3501
dbritto-dev merged 1 commit into
pmndrs:mainfrom
TheSeydiCharyyev:docs/devtools-troubleshooting-import

Conversation

@TheSeydiCharyyev

Copy link
Copy Markdown
Contributor

The "fixed example" in the "All action names are labeled as 'anonymous'" troubleshooting section uses the devtools middleware but doesn't import it.

The example calls devtools(...):

const useJungleStore = create<JungleStore>()(
  devtools((...args) => ({
    ...createBearSlice(...args),
    ...createFishSlice(...args),
  })),
)

but only imports create and StateCreator:

import { create, StateCreator } from 'zustand'

The "broken example" directly above it imports devtools correctly. Since the fixed example is meant to be the corrected version of that broken example, it should keep the same imports — as written it would throw a ReferenceError.

Diff

  import { create, StateCreator } from 'zustand'
+ import { devtools } from 'zustand/middleware'

Docs-only change — no changeset needed.

@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zustand-demo Ready Ready Preview, Comment May 20, 2026 9:26am

Request Review

@codesandbox-ci

Copy link
Copy Markdown

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.

@pkg-pr-new

pkg-pr-new Bot commented May 20, 2026

Copy link
Copy Markdown

commit: 73c128d

@dai-shi dai-shi requested a review from dbritto-dev May 20, 2026 09:32
@dbritto-dev dbritto-dev merged commit 60a91b4 into pmndrs:main May 20, 2026
33 checks passed
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