You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.2 KiB
1 line
5.2 KiB
2 years ago
|
{"ast":null,"code":"import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { ReactReduxContext } from './Context';\nimport { createSubscription } from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\n\nfunction Provider(_ref) {\n var store = _ref.store,\n context = _ref.context,\n children = _ref.children;\n var contextValue = useMemo(function () {\n var subscription = createSubscription(store);\n return {\n store: store,\n subscription: subscription\n };\n }, [store]);\n var previousState = useMemo(function () {\n return store.getState();\n }, [store]);\n useIsomorphicLayoutEffect(function () {\n var subscription = contextValue.subscription;\n subscription.onStateChange = subscription.notifyNestedSubs;\n subscription.trySubscribe();\n\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n\n return function () {\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n };\n }, [contextValue, previousState]);\n var Context = context || ReactReduxContext;\n return /*#__PURE__*/React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nif (process.env.NODE_ENV !== 'production') {\n Provider.propTypes = {\n store: PropTypes.shape({\n subscribe: PropTypes.func.isRequired,\n dispatch: PropTypes.func.isRequired,\n getState: PropTypes.func.isRequired\n }),\n context: PropTypes.object,\n children: PropTypes.any\n };\n}\n\nexport default Provider;","map":{"version":3,"names":["React","useMemo","PropTypes","ReactReduxContext","createSubscription","useIsomorphicLayoutEffect","Provider","_ref","store","context","children","contextValue","subscription","previousState","getState","onStateChange","notifyNestedSubs","trySubscribe","tryUnsubscribe","Context","createElement","value","process","env","NODE_ENV","propTypes","shape","subscribe","func","isRequired","dispatch","object","any"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/node_modules/react-redux/es/components/Provider.js"],"sourcesContent":["import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { ReactReduxContext } from './Context';\nimport { createSubscription } from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\n\nfunction Provider(_ref) {\n var store = _ref.store,\n context = _ref.context,\n children = _ref.children;\n var contextValue = useMemo(function () {\n var subscription = createSubscription(store);\n return {\n store: store,\n subscription: subscription\n };\n }, [store]);\n var previousState = useMemo(function () {\n return store.getState();\n }, [store]);\n useIsomorphicLayoutEffect(function () {\n var subscription = contextValue.subscription;\n subscription.onStateChange = subscription.notifyNestedSubs;\n subscription.trySubscribe();\n\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n\n return function () {\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n };\n }, [contextValue, previousState]);\n var Context = context || ReactReduxContext;\n return /*#__PURE__*/React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nif (process.env.NODE_ENV !== 'production') {\n Provider.propTypes = {\n store: PropTypes.shape({\n subscribe: PropTypes.func.isRequired,\n dispatch: PropTypes.func.isRequired,\n getState: PropTypes.func.isRequired\n }),\n context: PropTypes.object,\n children: PropTypes.any\n };\n}\n\nexport default Provider;"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,OAAhB,QAA+B,OAA/B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,iBAAT,QAAkC,WAAlC;AACA,SAASC,kBAAT,QAAmC,uBAAnC;AACA,SAASC,yBAAT,QAA0C,oCAA1C;;AAEA,SAASC,QAAT,CAAkBC,IAAlB,EAAwB;EACtB,IAAIC,KAAK,GAAGD,IAAI,CAACC,KAAjB;EAAA,IACIC,OAAO,GAAGF,I
|