yarn zustand 4.4.0
v4.4.0

latest releases: 5.0.0-rc.1, 5.0.0-rc.0, 4.5.5...
14 months ago

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 the default equalityFn which can be changed 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

Full Changelog: v4.3.9...v4.4.0

Don't miss a new zustand release

NewReleases is sending notifications on new releases.