Packages

zustand

5.0.16 · 22 Oct 2026MIT87.8M / weekRepositorynpmAtom feed

Your version

4.4.0

1 Aug 2023Where it was published

4.5.7 is the newest release of 4.x.

In short

1 deprecated1 fixed

  • deprecated

    Deprecate equalityFn and add createWithEqualityFn

Release note

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

  • deprecated

    Deprecate equalityFn and add createWithEqualityFn

  • Declare @types/react as peerDep to avoid phantom dep