16 lines
367 B
JavaScript
16 lines
367 B
JavaScript
// Metro module 3804 (f3805).
|
|
import { useRef } from "react";
|
|
import { shallow } from "./isIterable";
|
|
export function useShallow(c13621_0) {
|
|
const ref = useRef(void 0);
|
|
return (a0) => {
|
|
let current = c13621_0(a0);
|
|
if (shallow(ref.current, current)) {
|
|
current = ref.current;
|
|
} else {
|
|
ref.current = current;
|
|
}
|
|
return current;
|
|
};
|
|
}
|