Files
ETB/ETB-FrontEnd/node_modules/@mui/x-internals/store/useStore.js
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

14 lines
614 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useStore = useStore;
var _withSelector = require("use-sync-external-store/shim/with-selector");
/* We need to import the shim because React 17 does not support the `useSyncExternalStore` API.
* More info: https://github.com/mui/mui-x/issues/18303#issuecomment-2958392341 */
function useStore(store, selector, a1, a2, a3) {
const selectorWithArgs = state => selector(state, a1, a2, a3);
return (0, _withSelector.useSyncExternalStoreWithSelector)(store.subscribe, store.getSnapshot, store.getSnapshot, selectorWithArgs);
}