UNPKG

set-state-compare

Version:

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

8 lines 446 B
/** * @param {any} component * @param {Record<string, any> | function(Record<string, any>): Record<string, any>} state * @param {function(): void} [callback] * @returns {Promise<void>} Resolves when the state is set or skipped. */ export default function setState(component: any, state: Record<string, any> | ((arg0: Record<string, any>) => Record<string, any>), callback?: () => void): Promise<void>; //# sourceMappingURL=set-state.d.ts.map