mattermost-redux
Version:
Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client
14 lines (13 loc) • 766 B
TypeScript
import type { Reducer, Store } from 'redux';
import type { GlobalState } from '@mattermost/types/store';
/**
* Configures and constructs the redux store. Accepts the following parameters:
* preloadedState - Any preloaded state to be applied to the store after it is initially configured.
* appReducer - An object containing any app-specific reducer functions that the client needs.
* getAppReducers - A function that returns the appReducer as defined above. Only used in development to enable hot reloading.
*/
export default function configureStore<S extends GlobalState>({ appReducers, getAppReducers, preloadedState, }: {
appReducers: Record<string, Reducer>;
getAppReducers: () => Record<string, Reducer>;
preloadedState: Partial<S>;
}): Store;