UNPKG

set-state-compare

Version:

setState for React that compares with the current state and only sets the state if changed.

11 lines (8 loc) 197 B
if (!globalThis.setStateCompareData) { globalThis.setStateCompareData = { rendering: 0, renderingCallbacks: [] } } const shared = globalThis.setStateCompareData export default shared