@bemedev/app-react
Version:
Use app-ts inside react
14 lines (11 loc) • 326 B
JavaScript
import { dequal } from 'dequal';
function getSnapshot(service, ref) {
const snapShot = service.getSnapshot();
const check = dequal(snapShot, ref.current);
if (check)
return ref.current;
ref.current = snapShot;
return ref.current;
}
export { getSnapshot };
//# sourceMappingURL=getSnapshot.js.map