yarn zustand 5.0.0
v5.0.0

11 hours ago

🎉🎉🎉 Zustand v5 🐻🐻🐻

TL;DR

  • No new features
  • Migration from v4 should be smooth.

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

Don't miss a new zustand release

NewReleases is sending notifications on new releases.