UNPKG

mattermost-redux

Version:

Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client

14 lines (13 loc) 1.34 kB
import * as redux from 'redux'; /** * 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. * userOfflineConfig - Any additional configuration data to be passed into redux-offline aside from the default values. * getAppReducer - A function that returns the appReducer as defined above. Only used in development to enable hot reloading. * clientOptions - An object containing additional options used when configuring the redux store. The following options are available: * additionalMiddleware - func | array - Allows for single or multiple additional middleware functions to be passed in from the client side. * enableBuffer - bool - default = true - If true, the store will buffer all actions until offline state rehydration occurs. * enableThunk - bool - default = true - If true, include the thunk middleware automatically. If false, thunk must be provided as part of additionalMiddleware. */ export default function configureServiceStore(preloadedState: any, appReducer: any, userOfflineConfig: any, getAppReducer: any, clientOptions: any): redux.Store<unknown, redux.Action<any>>;