Skip to content

Releases: pmndrs/zustand

v5.0.5

21 May 12:07
Compare
Choose a tag to compare

It comes with some small improvements.

What's Changed

New Contributors

Full Changelog: v5.0.4...v5.0.5

4.5.7

15 May 02:29
Compare
Choose a tag to compare

See: #3087 (comment)

Full Changelog: v4.5.6...4.5.7

v5.0.4

01 May 23:43
Compare
Choose a tag to compare

This fixes module resolution issue for React Native users.

What's Changed

  • refactor(traditional): remove duplicated ExtractState type declaration by @shinhyogeun in #2982
  • fix(package): react-native condition by @dai-shi in #3087

New Contributors

Full Changelog: v5.0.3...v5.0.4

v5.0.3

07 Jan 14:22
Compare
Choose a tag to compare

ExtractState is a type util to extract state type from store type.

What's Changed

New Contributors

Full Changelog: v5.0.2...v5.0.3

v4.5.6

07 Jan 13:01
Compare
Choose a tag to compare

See: #2943

Full Changelog: v4.5.5...v4.5.6

v5.0.2

04 Dec 15:10
Compare
Choose a tag to compare

This fixes some issues in middleware.

What's Changed

New Contributors

Full Changelog: v5.0.1...v5.0.2

v5.0.1

30 Oct 12:05
Compare
Choose a tag to compare

This fixes shallow function for some edge cases.

What's Changed

  • fix(shallow): fallback map-like iterator comparison by @dai-shi in #2795
  • fix(shallow): iterable-like insensitive keys order comparison (alternate implementation) by @dai-shi in #2821

New Contributors

Full Changelog: v5.0.0...v5.0.1

v5.0.0

14 Oct 14:17
Compare
Choose a tag to compare

πŸŽ‰πŸŽ‰πŸŽ‰ 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: v4.5.5...v5.0.0

v5.0.0-rc.2

15 Sep 03:17
Compare
Choose a tag to compare
v5.0.0-rc.2 Pre-release
Pre-release

Hopefully, this will be the last RC, unless we have serious bug reports in #2741.

What's Changed

New Contributors

Full Changelog: v5.0.0-rc.1...v5.0.0-rc.2

v5.0.0-rc.1

27 Aug 01:23
Compare
Choose a tag to compare
v5.0.0-rc.1 Pre-release
Pre-release

This version includes some minor changes. Please report any issues if you find.

What's Changed

New Contributors

Full Changelog: v5.0.0-rc.0...v5.0.0-rc.1