UNPKG

@bemedev/app-react

Version:
12 lines (11 loc) 319 B
import { dequal } from "dequal"; //#region src/utils/getSnapshot.ts function getSnapshot(service, ref) { const snapShot = service.state; if (dequal(snapShot, ref.current)) return ref.current; ref.current = snapShot; return ref.current; } //#endregion export { getSnapshot }; //# sourceMappingURL=getSnapshot.js.map