where as the implementation in generateStore.jshttps://github.com/trufflesuite/drizzle/blob/develop/packages/store/src/generateStore.js
uses for the same attribute the name appReducers.
Therefore, a user relying on the interface attribute name and using it for setting the reducer variable, will cause in the reducers being not applied to the store.
Also the attribute name in the documentation is wrong.
/**
* Generate the redux store by combining drizzleOptions, application reducers,
* middleware and initial app state.
*
* @param {object} config - The configuration object
* @param {object} config.drizzleOptions - drizzle configuration object
* @param {object} config.reducers={} - application level reducers to include in drizzle's redux store
* @param {object[]} config.appSagas=[] - application sagas to be managed by drizzle's saga middleware
* @param {object[]} config.appMiddlewares=[] - application middlewares to be managed by drizzle's saga middleware
* @param {boolean} config.disableReduxDevTools=false - disable redux devtools hook
* @returns {object} Redux store
*
*/
export function generateStore ({
drizzleOptions,
appReducers = {},
appSagas = [],
appMiddlewares = [],
disableReduxDevTools = false,
...options
}) {...}
Solution: Rename interface attribute to match implementation signature.
reducers -> appReducers
Issue: In
generateStore.d.ts
https://github.com/trufflesuite/drizzle/blob/develop/packages/store/types/generateStore.d.ts the attribute for reducers has the namereducers
where as the implementation in
generateStore.js
https://github.com/trufflesuite/drizzle/blob/develop/packages/store/src/generateStore.js uses for the same attribute the nameappReducers
. Therefore, a user relying on the interface attribute name and using it for setting the reducer variable, will cause in the reducers being not applied to the store. Also the attribute name in the documentation is wrong.Solution: Rename interface attribute to match implementation signature. reducers -> appReducers