UNPKG

@mui/x-charts

Version:

The community edition of the Charts components (MUI X).

13 lines (12 loc) 539 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useSelector = void 0; var _withSelector = require("use-sync-external-store/with-selector"); const defaultCompare = Object.is; const useSelector = (store, selector, args = undefined, equals = defaultCompare) => { const selectorWithArgs = state => selector(state, args); return (0, _withSelector.useSyncExternalStoreWithSelector)(store.subscribe, store.getSnapshot, store.getSnapshot, selectorWithArgs, equals); }; exports.useSelector = useSelector;