REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.51 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/react-redux/src/hooks/useStore.ts
Text
Base64
import type { Context } from 'react' import type { Action as BasicAction, AnyAction, Store } from 'redux' import type { ReactReduxContextValue } from '../components/Context' import { ReactReduxContext } from '../components/Context' import { useReduxContext as useDefaultReduxContext, createReduxContextHook, } from './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. */ export function createStoreHook< S = unknown, A extends BasicAction = AnyAction // @ts-ignore >(context?: Context<ReactReduxContextValue<S, A>> = ReactReduxContext) { const useReduxContext = // @ts-ignore context === ReactReduxContext ? useDefaultReduxContext : // @ts-ignore createReduxContextHook(context) return function useStore< State = S, Action extends BasicAction = A // @ts-ignore >() { const { store } = useReduxContext()! // @ts-ignore return store as Store<State, Action> } } /** * 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> * } */ export const useStore = /*#__PURE__*/ createStoreHook()
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
useDispatch.ts
1.66 KB
lrw-r--r--
2026-02-28 00:30:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useReduxContext.ts
1.44 KB
lrw-r--r--
2026-02-28 00:30:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useSelector.ts
6.56 KB
lrw-r--r--
2026-02-28 00:30:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useStore.ts
1.51 KB
lrw-r--r--
2026-02-28 00:30:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).