Viewing File: /home/ubuntu/misabloom-frontend-base/node_modules/zustand/umd/context.production.js

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("zustand")):"function"==typeof define&&define.amd?define(["exports","react","zustand"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zustandContext={},e.React,e.zustand)}(this,(function(e,t,r){"use strict";e.default=function(){var e=t.createContext(void 0);return{Provider:function(r){var n=r.createStore,o=r.children,u=t.useRef();return u.current||(u.current=n()),t.createElement(e.Provider,{value:u.current},o)},useStore:function(n,o){var u=t.useContext(e);if(!u)throw new Error("Seems like you have not used zustand provider as an ancestor.");return r.useStore(u,n,o)},useStoreApi:function(){var r=t.useContext(e);if(!r)throw new Error("Seems like you have not used zustand provider as an ancestor.");return t.useMemo((function(){return{getState:r.getState,setState:r.setState,subscribe:r.subscribe,destroy:r.destroy}}),[r])}}},Object.defineProperty(e,"__esModule",{value:!0})}));
Back to Directory File Manager