Initial commit with Advoware proxy

This commit is contained in:
root
2025-10-19 14:57:07 +00:00
commit 273aa8b549
45771 changed files with 5534555 additions and 0 deletions

View File

@@ -0,0 +1 @@
export declare function useShallow<S, U>(selector: (state: S) => U): (state: S) => U;

View File

@@ -0,0 +1,14 @@
'use strict';
var React = require('react');
var shallow = require('zustand/vanilla/shallow');
function useShallow(selector) {
const prev = React.useRef(void 0);
return (state) => {
const next = selector(state);
return shallow.shallow(prev.current, next) ? prev.current : prev.current = next;
};
}
exports.useShallow = useShallow;