UNPKG

redux-toolkit-state

Version:

🚀 A powerful & lightweight React hook library that simplifies Redux state management with a familiar useState-like API. Built on Redux Toolkit for optimal performance.

24 lines • 977 B
/** * Hook for selecting specific parts of global state * @param key - The global state key * @param selector - Function to select specific data from the state * @returns The selected value */ export declare function useReduxStateSelector<T, R>(key: string, selector: (state: T) => R): R; /** * This hook is useful for accessing a specific value from the global state without needing to provide a selector function. * Hook for selecting a specific global state value * * @param key - The global state key * @template T - The type of the global state value * * @returns The value of the global state */ export declare const useReduxStateValue: <T>(key: string) => T; /** * Hook for selecting multiple global states at once * @param keys - Array of global state keys * @returns Object with selected states */ export declare function useMultipleGlobalStates<T extends Record<string, any>>(keys: (keyof T)[]): T; //# sourceMappingURL=useReduxStateSelector.d.ts.map