release notes
release notes
🐻 Bear necessities for state management in React
release notes
Published 8/1/2023
MinorContains breaking changesThis adds new zustand/traditional entry point and deprecates equalityFn from zustand.
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
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.9...v4.4.0
release notes
Published 8/1/2023
MinorContains breaking changesThis adds new zustand/traditional entry point and deprecates equalityFn from zustand.
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
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.9...v4.4.0