PHP 8.2.30
Preview: useStore.js Size: 1.21 KB
/home/byroehnu/easepay.easetack.com/node_modules/react-redux/lib/hooks/useStore.js

"use strict";

exports.__esModule = true;
exports.createStoreHook = createStoreHook;
exports.useStore = void 0;

var _Context = require("../components/Context");

var _useReduxContext = require("./useReduxContext");

/**
 * Hook factory, which creates a `useStore` hook bound to a given context.
 *
 * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
 * @returns {Function} A `useStore` hook bound to the specified context.
 */
function createStoreHook(context = _Context.ReactReduxContext) {
  const useReduxContext = // @ts-ignore
  context === _Context.ReactReduxContext ? _useReduxContext.useReduxContext : // @ts-ignore
  (0, _useReduxContext.createReduxContextHook)(context);
  return function useStore() {
    const {
      store
    } = useReduxContext(); // @ts-ignore

    return store;
  };
}
/**
 * A hook to access the redux store.
 *
 * @returns {any} the redux store
 *
 * @example
 *
 * import React from 'react'
 * import { useStore } from 'react-redux'
 *
 * export const ExampleComponent = () => {
 *   const store = useStore()
 *   return <div>{store.getState()}</div>
 * }
 */


const useStore = /*#__PURE__*/createStoreHook();
exports.useStore = useStore;

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
127 B lr--r--r-- 2026-03-14 01:49:19
Edit Download
1.43 KB lrw-r--r-- 2026-02-28 00:29:10
Edit Download
1.48 KB lrw-r--r-- 2026-02-28 00:29:14
Edit Download
5.34 KB lrw-r--r-- 2026-02-28 00:29:18
Edit Download
1.21 KB lrw-r--r-- 2026-02-28 00:29:22
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).