UNPKG

set-state-compare

Version:

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

15 lines 578 B
export default memoCompareProps; /** * @param {Record<string, any>} prevProps * @param {Record<string, any>} nextProps * @returns {boolean} */ export function memoComparePropsWithDebug(prevProps: Record<string, any>, nextProps: Record<string, any>): boolean; /** * @param {Record<string, any>} prevProps * @param {Record<string, any>} nextProps * @param {boolean} [debug] * @returns {boolean} */ declare function memoCompareProps(prevProps: Record<string, any>, nextProps: Record<string, any>, debug?: boolean): boolean; //# sourceMappingURL=memo-compare-props.d.ts.map