set-state-compare
Version:
setState for React that compares with the current state and only sets the state if changed.
16 lines (14 loc) • 438 B
JavaScript
import {anythingDifferent, arrayDifferent, isSimpleObject, simpleObjectDifferent, simpleObjectValuesDifferent} from "./diff-utils.js"
import Shape from "./shape.js"
import shouldComponentUpdate from "./should-component-update.js"
import setState from "./set-state.js"
export {
anythingDifferent,
arrayDifferent,
isSimpleObject,
shouldComponentUpdate,
simpleObjectDifferent,
simpleObjectValuesDifferent,
Shape,
setState
}