Skip to content

docs(use-shallow): add troubleshooting entry for "Maximum update depth exceeded"#3507

Merged
dbritto-dev merged 2 commits into
pmndrs:mainfrom
hyun907:docs/use-shallow-troubleshooting
Jun 3, 2026
Merged

docs(use-shallow): add troubleshooting entry for "Maximum update depth exceeded"#3507
dbritto-dev merged 2 commits into
pmndrs:mainfrom
hyun907:docs/use-shallow-troubleshooting

Conversation

@hyun907

@hyun907 hyun907 commented May 23, 2026

Copy link
Copy Markdown
Contributor

Related Bug Reports or Discussions

Related: #3228, #3225, #2979, #2864, #2771, #2748, #2962

Summary

The Troubleshooting section of the use-shallow reference page was a TBD placeholder. New v5 users frequently encounter Maximum update depth exceeded when selecting multiple store values into an inline object, but there is no docs guidance pointing them to useShallow.

Added a troubleshooting entry that explains the root cause (inline object selector creates a new reference every render → equality check always fails → infinite loop), shows the broken pattern, shows the useShallow fix, shows the alternative (separate selectors), and links to the v5 migration guide.

Check List

  • pnpm run fix for formatting and linting code and docs

@vercel

vercel Bot commented May 23, 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 Jun 3, 2026 10:20pm

Request Review

@hyun907 hyun907 changed the title docs(use-shallow): add troubleshooting entry for "Maximum update dept… docs(use-shallow): add troubleshooting entry for "Maximum update depth exceeded" May 23, 2026
@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 23, 2026

Copy link
Copy Markdown

commit: 034ceea

@dai-shi dai-shi requested a review from dbritto-dev May 23, 2026 23:35

@dbritto-dev dbritto-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbritto-dev dbritto-dev merged commit 4e15c2e into pmndrs:main Jun 3, 2026
32 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