UNPKG

set-state-compare

Version:

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

8 lines 439 B
/** * @param {any} component * @param {Record<string, any>} nextProps * @param {Record<string, any>} [nextState] * @returns {boolean} Whether the component should update or not. True means it should update. False means it should not update. */ export default function shouldComponentUpdate(component: any, nextProps: Record<string, any>, nextState?: Record<string, any>): boolean; //# sourceMappingURL=should-component-update.d.ts.map