v4.4.0
This adds new zustand/traditional
entry point and deprecates equalityFn from zustand
.
Migration Guide
If you don't use custom equalityFn
, nothing is required.
For those who use custom equalityFn such as shallow
:
// previously
import { create } from 'zustand'
const useFooStore = create((set) => ...)
// now
import { createWithEqualityFn } from 'zustand/traditional'
const useFooStore = createWithEqualityFn((set) => ..., Object.is)
// Object.is is the default quailtyFn in zustand create; to match that behavior, pass that function here. This can be updated to shallow or anything else
What's Changed
- feat: deprecate equalityFn and add createWithEqualityFn by @dai-shi in #1945
- fix: declare @types/react as peerDep to avoid phantom dep by @leviosa-e in #1963
New Contributors
- @luizeboli made their first contribution in #1915
- @mohammedmulazada made their first contribution in #1931
- @coder054 made their first contribution in #1932
- @itayperry made their first contribution in #1957
- @cwtuan made their first contribution in #1953
- @tiagobento made their first contribution in #1962
- @leviosa-e made their first contribution in #1963
Full Changelog: v4.3.9...v4.4.0