Releases: pmndrs/zustand
v4.0.0-rc.2
We've made some changes in TypeScript types. We believe what's remaining is basically docs issues. Please feel free to open issues/discussions.
What's Changed
- fix(types): Mark more methods bivariant by @RyanCavanaugh in #1029
- fix(types): remove
Partial
typo frompersist
by @devanshj in #1051 - fix(shallow): restrict types by @dai-shi in #1070
- feature(persist): add method getOptions on persist api and update documentation by @tbor00 in #1075
- feat(types): minimize types by deprecating them by @devanshj in #1089
- fix(build): a workaround for ESM for use-sync-external-store by @dai-shi in #953
New Contributors
- @mahendradambe made their first contribution in #956
- @himself65 made their first contribution in #978
- @jenglamlow made their first contribution in #988
- @InfiniteXyy made their first contribution in #1006
- @guilleon-velasco made their first contribution in #1009
- @sepehr-safari made their first contribution in #1049
- @rnike made their first contribution in #1056
- @tbor00 made their first contribution in #1071
- @Carnageous made their first contribution in #1057
- @xlboy made their first contribution in #1082
- @RyanCavanaugh made their first contribution in #1029
Full Changelog: v4.0.0-rc.1...v4.0.0-rc.2
v4.0.0-rc.1
This improves some types for TypeScript users. Please read ./docs
for TypeScript usage and v4 migration.
What's Changed
- breaking(middleware/devtools): remove checking old string option by @dai-shi in #933
- Fix TS4023 and other minor changes by @devanshj in #940
- fix(types): avoid any in react.ts by @dai-shi in #941
New Contributors
Full Changelog: v4.0.0-rc.0...v4.0.0-rc.1
v4.0.0-rc.0
Long-awaited zustand v4!
We started working on #550 at Aug 31 2021. It's been more than 7 months!
Release status
Although this release is v4.0.0-rc.0, we treat this as a normal release. While we might make some changes before the final one, the stability of this release should be same as other releases like v3.7.*.
No breaking changes in JavaScript API
Most notably, this release is backward compatible with the latest v3 API. Some features deprecated in v3 are removed in v4. It's highly recommended to update to latest v3, before upgrading to v4, and check any deprecation messages.
Big rewrite in TypeScript
Zustand code in JS is surprisingly small, and its value is actually in TypeScript. Although it is very tricky to support mutation nature of zustand middleware, @devanshj did a great job to support types as much as possible. There are some breaking changes in types from v3. Please refer ./docs/typescript.md
and ./docs/v4-migration.md
.
Your feedback is necessary
As always, feedback is welcome, and even necessary this time because otherwise nothing happens. Please try v4 and open issues and discussions (discussions are preferable if you are not sure which).
What's Changed
- breaking(vanilla): drop deprecated store.subscribe with selector by @dai-shi in #604
- breaking(middleware): drop deprecated persist options and make removeItem required by @dai-shi in #598
- breaking(core): drop v2 hook compatibility by @dai-shi in #597
- breaking(types): drop deprecated UseStore type by @dai-shi in #596
- feat: use-sync-external-store by @dai-shi in #550
- breaking(middleware/devtools): use official devtools extension types by @dai-shi in #819
- breaking(middleware/devtools): remove deprecations and warnings by @devanshj in #892
- fix(build): separate vanilla build by @dai-shi in #904
- breaking(types): Add higher kinded mutator types by @devanshj in #725
- fix(index): export createStore from vanilla by @dai-shi in #914
- fix(middleware): separate immer middleware by @dai-shi in #915
- fix(middleware/devtools): add
enabled
option and show devtools warning only if enabled by @Aslemammad in #880
Full Changelog: v3.7.2...v4.0.0-rc.0
v3.7.2
This fixes an issue in persist
for some use cases.
What's Changed
- fix(middleware/persist): Merge storage value with the latest store state by @zerofirework in #894
New Contributors
- @disambiguator made their first contribution in #876
- @zerofirework made their first contribution in #894
Full Changelog: v3.7.1...v3.7.2
v3.7.1
v3.7.0
This release is to prepare for v4 release, which will include some breaking changes. Especially typing store with middleware will be changed. This release gives partial migration path (see tests/middlewareTypes.test.tsx
for examples), so it's highly recommended to try this version before v4 comes and report issues.
It also fixes some small typing issues and improves UMD/SystemJS bundling. Oh, and last but not least, vite users don't need to set NODE_ENV
anymore.
What's Changed
- fix(devtools): don't show jsdoc deprecation warning when no options are passed by @devanshj in #781
- fix(middleware): match vanilla StateCreator type in subscribeWithSelector by @toddw in #787
- feat(build): use
__DEV__
to control development mode by @dai-shi in #789 - feat: Migrations regarding higher kinded mutators for v4 by @devanshj in #772
New Contributors
- @DanielPower made their first contribution in #751
- @toddw made their first contribution in #787
Full Changelog: v3.6.9...v3.7.0
v3.6.9
v3.6.8
This fixes some issues in devtools
middleware.
What's Changed
- fix(middleware/devtools): minor fixes for pause recording feature by @devanshj in #720
- fix(middleware/devtools): revert extension connector with try-catch to fix RN usage by @dai-shi in #724
- fix(middleware/devtools): deprecate passing name directly instead of an object by @devanshj in #731
New Contributors
- @skuteli made their first contribution in #718
- @omidantilong made their first contribution in #712
Full Changelog: v3.6.7...v3.6.8
v3.6.7
v3.6.6
This fixes and improves devtools
middleware. The basic usage shouldn't be changed. If you have questions on usage, please open a new discussion.
What's Changed
- refactor(core): extract react.ts from index.ts by @dai-shi in #663
- refactor(middleware): split into multiple files by @dai-shi in #664
- rewrite
devtools
by @devanshj in #675
New Contributors
Full Changelog: v3.6.5...v3.6.6