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.
32 lines • 1.26 kB
TypeScript
import { Slice } from '@reduxjs/toolkit';
/**
* Get or create store instance
* @returns The singleton store instance
*/
export declare const getStore: () => import("@reduxjs/toolkit").EnhancedStore<{
[x: string]: unknown;
}, import("redux").Action<string>, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
dispatch: import("redux-thunk").ThunkDispatch<{
[x: string]: unknown;
}, undefined, import("redux").UnknownAction>;
}>, import("redux").StoreEnhancer]>>;
/**
* @description Creates a Redux slice for a given key with initial value.
*
* @param key - Unique identifier for the slice
* @param initialValue - Initial value for the slice
* @returns The created slice
*/
export declare const createSliceForKey: <T>(key: string, initialValue: T) => Slice<T>;
/** * Get a slice for a given key
* @param key - The unique identifier for the slice
*/
export declare const getSliceForKey: <T>(key: string) => Slice<T> | null;
/**
* Get all registered keys
* @returns An array of keys for all registered slices
*/
export declare const getRegisteredKeys: () => string[];
/** clear all slices to check slices registry and clean up */
export declare const clearSlices: () => void;
//# sourceMappingURL=store.d.ts.map