zslabs-next
zslabs-next copied to clipboard
Bump zustand from 3.7.2 to 4.0.0
Bumps zustand from 3.7.2 to 4.0.0.
Release notes
Sourced from zustand's releases.
v4.0.0
🎉 🎉 🎉 Zustand v4 is here 🎉 🎉 🎉
Backward compatible with v3 in JS
v4 API is completely backward compatible, so it's just nothing to update if you are JS users.
One note is v4 depends on use-sync-external-store. There might be some bundling issues. Please report them if you encounter such cases.
TypeScript types are rewritten
To better support types with middleware, v4 TypeScript code is rewritten. Please find docs/typescript.md for more information.
New API for context usage
In v3,
zustand/context
is provided as a workaround. v4 API exposescreateStore
anduseStore
, which are more flexible. Please read this for usage. If you are unsure about the usage, open a new discussion.Counter example: https://codesandbox.io/s/polished-pond-4jn1e2
Deprecated APIs are removed
Some APIs are already deprecated in v3, and they are removed in v4. Please make sure to update to the latest version of v3 before migrating to v4.
What's Changed
- breaking(vanilla): drop deprecated store.subscribe with selector by
@dai-shi
in pmndrs/zustand#604- breaking(middleware): drop deprecated persist options and make removeItem required by
@dai-shi
in pmndrs/zustand#598- breaking(core): drop v2 hook compatibility by
@dai-shi
in pmndrs/zustand#597- breaking(types): drop deprecated UseStore type by
@dai-shi
in pmndrs/zustand#596- feat: use-sync-external-store by
@dai-shi
in pmndrs/zustand#550- breaking(middleware/devtools): use official devtools extension types by
@dai-shi
in pmndrs/zustand#819- breaking(middleware/devtools): remove deprecations and warnings by
@devanshj
in pmndrs/zustand#892- fix(build): separate vanilla build by
@dai-shi
in pmndrs/zustand#904- breaking(types): Add higher kinded mutator types by
@devanshj
in pmndrs/zustand#725- fix(index): export createStore from vanilla by
@dai-shi
in pmndrs/zustand#914- fix(middleware): separate immer middleware by
@dai-shi
in pmndrs/zustand#915- fix(middleware/devtools): add
enabled
option and show devtools warning only if enabled by@Aslemammad
in pmndrs/zustand#880- breaking(middleware/devtools): remove checking old string option by
@dai-shi
in pmndrs/zustand#933- Fix TS4023 and other minor changes by
@devanshj
in pmndrs/zustand#940- fix(types): avoid any in react.ts by
@dai-shi
in pmndrs/zustand#941- fix(build): add downlevel-dts by
@dai-shi
in pmndrs/zustand#1005- refactor: prefer interfaces by
@dai-shi
in pmndrs/zustand#1012- fix(types): Mark more methods bivariant by
@RyanCavanaugh
in pmndrs/zustand#1029- fix(types): remove
Partial
typo frompersist
by@devanshj
in pmndrs/zustand#1051- fix(shallow): restrict types by
@dai-shi
in pmndrs/zustand#1070
... (truncated)
Commits
cf46b42
4.0.0f98d186
chore(deps): update dev dependencies (#1132)fa581dd
fix(docs): useBoundStore instead of useStore (#1125)f07276c
docs: 3d party libraries page added to docs (#1016)da15804
Create maps-and-sets-usage.md (#997)2517d5a
perf(example): remove unnecessary imports of "prismjs" (#1129)a4b08a1
refactor(types): avoid using deprecated types in tests (#1126)0fa3abd
4.0.0-rc.449dcec0
fix(types): avoid using deprecated types (#1122)0938b17
fix(shallow): types with useStore again (#1117)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
zslabs-next | ✅ Ready (Inspect) | Visit Preview | Jul 26, 2022 at 7:14PM (UTC) |