Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency zustand to v5 (main) #2635

Merged
merged 2 commits into from
Nov 19, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 24, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
zustand ^4.4.7 -> ^5.0.0 age adoption passing confidence

Release Notes

pmndrs/zustand (zustand)

v5.0.1

Compare Source

This fixes shallow function for some edge cases.

What's Changed

New Contributors

Full Changelog: pmndrs/zustand@v5.0.0...v5.0.1

v5.0.0

Compare Source

🎉🎉🎉 Zustand v5 🐻🐻🐻

TL;DR

  • No new features
  • Drop many old things
  • Migration from v4 should be smooth.

Changes in v5

  • Drop default exports
  • Drop deprecated features
  • Make React 18 the minimum required version
  • Make use-sync-external-store a peer dependency (required for createWithEqualityFn and useStoreWithEqualityFn in zustand/traditional)
  • Make TypeScript 4.5 the minimum required version
  • Drop UMD/SystemJS support
  • Organize entry points in the package.json
  • Drop ES5 support
  • Stricter types when setState's replace flag is set
  • Persist middleware behavioral change
  • Other small improvements (technically breaking changes)

Migration Guide

Read the migration guide carefully:
https://github.com/pmndrs/zustand/blob/main/docs/migrations/migrating-to-v5.md

Frequently Reported Issue

During the RC period, some users encountered the following infinite loop error:

Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

This case was already a non-ideal behavior in v4 but appears more explicitly as an error in v5. While there are several ways to resolve this, using useShallow often fixes the problem.

What's Changed

New Contributors

Full Changelog: pmndrs/zustand@v4.5.5...v5.0.0


Configuration

📅 Schedule: Branch creation - "before 07:00 on Thursday" in timezone Europe/Oslo, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the kind/dependencies Pull requests that update a dependency file label Oct 24, 2024
@renovate renovate bot changed the title Update dependency zustand to v5 (main) fix(deps): update dependency zustand to v5 (main) Oct 28, 2024
@renovate renovate bot changed the title fix(deps): update dependency zustand to v5 (main) Update dependency zustand to v5 (main) Oct 29, 2024
@renovate renovate bot force-pushed the renovate/main-zustand-5.x branch 2 times, most recently from 513b179 to e47cf07 Compare November 6, 2024 08:37
@renovate renovate bot force-pushed the renovate/main-zustand-5.x branch from e47cf07 to 75b44ee Compare November 19, 2024 07:21
@renovate renovate bot force-pushed the renovate/main-zustand-5.x branch from 75b44ee to 12c0dec Compare November 19, 2024 11:09
@bjosttveit bjosttveit self-assigned this Nov 19, 2024
Copy link
Contributor

@olemartinorg olemartinorg left a comment

Choose a reason for hiding this comment

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

LGTM! 🙌

@bjosttveit bjosttveit merged commit a0413c3 into main Nov 19, 2024
13 checks passed
@bjosttveit bjosttveit deleted the renovate/main-zustand-5.x branch November 19, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants