This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
// Metro module 704 (f705).
import * as _Module19 from "react";
import { useDebugValue, useEffect, useLayoutEffect, useState } from "react";
let is2;
const checkIfSnapshotChanged = function checkIfSnapshotChanged({ getSnapshot: getSnapshot2, value: value2 }) {
let r8;
try {
r8 = !is2(value2, getSnapshot2());
} catch ($e) {
return true;
}
return r8;
};
is2 = typeof Object.is === "function" ? Object.is : function is(a0, a1) {
return a0 === a1 && (a0 !== 0 || 1 / a0 === 1 / a1) || a0 != a0 && a1 != a1;
};
export const useSyncExternalStore = _Module19.useSyncExternalStore !== void 0 ? _Module19.useSyncExternalStore : function useSyncExternalStore$1(a0, a1) {
const getSnapshot = a1;
const value = a1();
const state = useState({
inst: {
value,
getSnapshot: a1
}
});
const inst = state[0].inst;
const setState = state[1];
useLayoutEffect(function() {
inst.value = value;
inst.getSnapshot = getSnapshot;
if (checkIfSnapshotChanged(inst)) {
setState({
inst
});
}
}, [a0, value, a1]);
useEffect(function() {
if (checkIfSnapshotChanged(inst)) {
setState({
inst
});
}
return a0(function() {
if (checkIfSnapshotChanged(inst)) {
setState({
inst
});
}
});
}, [a0]);
useDebugValue(value);
return value;
};