{"version":3,"file":"commons-app-useDispatch.js.1979a659c0ac80f032a4.js","mappings":"mLASO,SAASA,EAAmBC,EAAU,KAC3C,MAAMC,EACND,IAAY,IAAoB,KAAkB,OAAgBA,GAClE,OAAO,WAGL,OAFcC,IAEDC,QACf,CACF,CAuBO,MAAMC,EAA2BJ,G","sources":["webpack://grfanclub-webview/./node_modules/react-redux/es/hooks/useDispatch.js"],"sourcesContent":["import { ReactReduxContext } from '../components/Context';\nimport { useStore as useDefaultStore, createStoreHook } from './useStore';\n/**\r\n * Hook factory, which creates a `useDispatch` hook bound to a given context.\r\n *\r\n * @param {React.Context} [context=ReactReduxContext] Context passed to your ``.\r\n * @returns {Function} A `useDispatch` hook bound to the specified context.\r\n */\n\nexport function createDispatchHook(context = ReactReduxContext) {\n const useStore = // @ts-ignore\n context === ReactReduxContext ? useDefaultStore : createStoreHook(context);\n return function useDispatch() {\n const store = useStore(); // @ts-ignore\n\n return store.dispatch;\n };\n}\n/**\r\n * A hook to access the redux `dispatch` function.\r\n *\r\n * @returns {any|function} redux store's `dispatch` function\r\n *\r\n * @example\r\n *\r\n * import React, { useCallback } from 'react'\r\n * import { useDispatch } from 'react-redux'\r\n *\r\n * export const CounterComponent = ({ value }) => {\r\n * const dispatch = useDispatch()\r\n * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])\r\n * return (\r\n *
\r\n * {value}\r\n * \r\n *
\r\n * )\r\n * }\r\n */\n\nexport const useDispatch = /*#__PURE__*/createDispatchHook();"],"names":["createDispatchHook","context","useStore","dispatch","useDispatch"],"sourceRoot":""}